diff options
Diffstat (limited to 'OS/sx-lib.sh')
-rw-r--r-- | OS/sx-lib.sh | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/OS/sx-lib.sh b/OS/sx-lib.sh index 7d6aac2..0df6f9c 100644 --- a/OS/sx-lib.sh +++ b/OS/sx-lib.sh @@ -16,8 +16,10 @@ function check_environment { echo "! WARNING : auto-assigned value : $CONTAINER_SERVICE" fi if [ ! -v CONTAINER_INSTANCE ]; then - echo "ERROR : environment var CONTAINER_INSTANCE is missing. EXIT !!!" - exit 1; + CONTAINER_INSTANCE=$CONTAINER_TYPE "_" $CONTAINER_SERVICE; + export CONTAINER_INSTANCE; + echo "! WARNING : environment var CONTAINER_INSTANCE is missing..." + echo "! WARNING : auto-assigned value : $CONTAINER_INSTANCE" fi } @@ -28,12 +30,12 @@ function display_container_header { if [ -v CONTAINER_TYPE ]; then echo "| Type : $CONTAINER_TYPE" fi - if [ -v CONTAINER_INSTANCE ]; then - echo "| Instance : $CONTAINER_INSTANCE" - fi if [ -v CONTAINER_SERVICE ]; then echo "| Service : $CONTAINER_SERVICE" fi + if [ -v CONTAINER_INSTANCE ]; then + echo "| Instance : $CONTAINER_INSTANCE" + fi echo "+=====================================================" } |