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