Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3396563
D4398.id13979.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D4398.id13979.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D4398: [services] Clean up `run_server_image.sh`
Attached
Detach File
Event Timeline
Log In to Comment