From aeca2ab94ac295efe82b92c2d037107f1f9fe14f Mon Sep 17 00:00:00 2001 From: Andrew Marchukov Date: Thu, 29 Apr 2021 10:39:28 +0300 Subject: [PATCH] added some features for autoupdate --- AutoUpdater/check-manifest.sh | 4 ++++ AutoUpdater/restart-ins.sh | 1 + 2 files changed, 5 insertions(+) diff --git a/AutoUpdater/check-manifest.sh b/AutoUpdater/check-manifest.sh index eada049..399d134 100644 --- a/AutoUpdater/check-manifest.sh +++ b/AutoUpdater/check-manifest.sh @@ -15,6 +15,10 @@ while true; do EXITSTATUS=$? if [ $EXITSTATUS -eq 0 ]; then if [ "$LOCALAPPVER" != "$REMOTEAPPVER" ]; then + for n in {60..1}; do + rcon -a "$rconip" -p "$rconpass" "say 'THE SERVER WILL BE RESTARTED IN $n'" + sleep 1 + done /opt/restart-ins.sh fi fi diff --git a/AutoUpdater/restart-ins.sh b/AutoUpdater/restart-ins.sh index e5b2304..949b8eb 100644 --- a/AutoUpdater/restart-ins.sh +++ b/AutoUpdater/restart-ins.sh @@ -5,6 +5,7 @@ if [ $EXITSTATUS -eq 0 ]; then echo "$LOCALAPPVER" >/opt/sandstorm-server.version docker stop sandstorm-modmap docker rm sandstorm-modmap + docker pull andrewmhub/insurgency-sandstorm docker run -d --restart always --env-file /home/user/coop-modmap/modmap.env \ --name sandstorm-modmap --net=host \ -v /home/user/coop-modmap/Mods:/home/steam/steamcmd/sandstorm/Insurgency/Mods:rw \