From a203556a53f40eb35a98dd383d07607184012e36 Mon Sep 17 00:00:00 2001 From: Andrew Marchukov Date: Thu, 29 Apr 2021 11:52:42 +0300 Subject: [PATCH] fix --- AutoUpdater/check-manifest.sh | 8 ++------ AutoUpdater/restart-ins.sh | 6 ++++++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/AutoUpdater/check-manifest.sh b/AutoUpdater/check-manifest.sh index 48bcb7d..b8cd330 100644 --- a/AutoUpdater/check-manifest.sh +++ b/AutoUpdater/check-manifest.sh @@ -15,12 +15,8 @@ while true; do EXITSTATUS=$? if [ $EXITSTATUS -eq 0 ]; then if [ "$LOCALAPPVER" != "$REMOTEAPPVER" ]; then - for n in {60..1}; do - for rconip in $(echo "${rconlist//,/ }"); do - rcon -a "$rconip" -p "$rconpass" "say 'THE SERVER WILL BE RESTARTED IN $n'" - sleep 1 - done - done + export rconlist + export rconpass /opt/restart-ins.sh fi fi diff --git a/AutoUpdater/restart-ins.sh b/AutoUpdater/restart-ins.sh index 949b8eb..33ef7b5 100644 --- a/AutoUpdater/restart-ins.sh +++ b/AutoUpdater/restart-ins.sh @@ -3,6 +3,12 @@ LOCALAPPVER=$(curl -s -X GET 'https://api.steamcmd.net/v1/info/581330' | jq -r - EXITSTATUS=$? if [ $EXITSTATUS -eq 0 ]; then echo "$LOCALAPPVER" >/opt/sandstorm-server.version + for n in {60..1}; do + for rconip in $(echo "${rconlist//,/ }"); do + rcon -a "$rconip" -p "$rconpass" "say 'THE SERVER WILL BE RESTARTED IN $n'" + sleep 1 + done + done docker stop sandstorm-modmap docker rm sandstorm-modmap docker pull andrewmhub/insurgency-sandstorm