diff --git a/scripts/deployment/restart_servers.sh b/scripts/deployment/restart_servers.sh index ef07e86c6bf..fcbf11443fd 100755 --- a/scripts/deployment/restart_servers.sh +++ b/scripts/deployment/restart_servers.sh @@ -22,10 +22,11 @@ else fi for SERVER in $SERVERS; do + HOSTNAME=$(host $SERVER | cut -d " " -f 1) EXTRA_OPTS="" if [[ $SERVER == ol-covers0* ]]; then EXTRA_OPTS="--scale covers=2" fi - ssh $SERVER "cd /opt/openlibrary; COMPOSE_FILE=$PRODUCTION HOSTNAME=$HOSTNAME docker-compose up --profile $SERVER --no-deps -d $EXTRA_OPTS" + ssh $SERVER "cd /opt/openlibrary; COMPOSE_FILE=$PRODUCTION HOSTNAME=$HOSTNAME docker-compose --profile $(echo $SERVER | cut -f1 -d '.') up --no-deps -d $EXTRA_OPTS" done