Page MenuHomePhabricator

D4398.id13979.diff
No OneTemporary

D4398.id13979.diff

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
@@ -2,8 +2,8 @@
set -e
-if [ "$#" -lt 1 ] || [ "$#" -gt 2 ]; then
- echo "Illegal number of parameters, expected:"
+if [[ "$#" -lt 1 ]] || [[ "$#" -gt 2 ]]; then
+ 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"
@@ -12,16 +12,16 @@
fi
SERVICE=$1
-if [ "$SERVICE" == "tunnelbroker" ]; then
- if [ ! -z "$2" ]; then
+if [[ "$SERVICE" == "tunnelbroker" ]]; then
+ if [[ -n "$2" ]]; then
export COMM_SERVICES_PORT_TUNNELBROKER=$2
fi
-elif [ "$SERVICE" == "backup" ]; then
- if [ ! -z "$2" ]; then
+elif [[ "$SERVICE" == "backup" ]]; then
+ if [[ -n "$2" ]]; then
export COMM_SERVICES_PORT_BACKUP=$2
fi
-elif [ "$SERVICE" == "blob" ]; then
- if [ ! -z "$2" ]; then
+elif [[ "$SERVICE" == "blob" ]]; 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

File Metadata

Mime Type
text/plain
Expires
Mon, Dec 2, 1:18 PM (16 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2607684
Default Alt Text
D4398.id13979.diff (1 KB)

Event Timeline