diff --git a/services/scripts/run_server_image.sh b/services/scripts/run_server_image.sh --- a/services/scripts/run_server_image.sh +++ b/services/scripts/run_server_image.sh @@ -3,7 +3,7 @@ set -e if [ "$#" -lt 1 ] || [ "$#" -gt 2 ]; then - echo "Illegal number of parameters, expected:" + echo "Illegal number of arguments, expected 2:" echo "- one argument with a name of the service, currently available services:" ./scripts/list_services.sh echo "- one optional argument with port" @@ -13,15 +13,15 @@ SERVICE=$1 if [ "$SERVICE" == "tunnelbroker" ]; then - if [ ! -z "$2" ]; then + if [ -n "$2" ]; then export COMM_SERVICES_PORT_TUNNELBROKER=$2 fi elif [ "$SERVICE" == "backup" ]; then - if [ ! -z "$2" ]; then + if [ -n "$2" ]; then export COMM_SERVICES_PORT_BACKUP=$2 fi elif [ "$SERVICE" == "blob" ]; then - if [ ! -z "$2" ]; then + if [ -n "$2" ]; then export COMM_SERVICES_PORT_BLOB=$2 fi else @@ -29,5 +29,5 @@ exit 1 fi -docker-compose build $SERVICE-server -docker-compose up $SERVICE-server +docker-compose build "$SERVICE"-server +docker-compose up "$SERVICE"-server