added some features for autoupdate

This commit is contained in:
Andrew Marchukov 2021-04-29 10:39:28 +03:00
parent 6c01d7b774
commit aeca2ab94a
2 changed files with 5 additions and 0 deletions

View file

@ -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

View file

@ -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 \