sandstorm-server/AutoUpdater/check-manifest.sh

12 lines
369 B
Bash
Raw Normal View History

2021-04-24 08:09:22 +00:00
#!/bin/bash
while true ; do
sleep $(( ( RANDOM % 360 ) + 60 ))
LOCALAPPVER=$(cat /opt/sandstorm-server.version)
REMOTEAPPVER=$(curl -s -X GET 'https://api.steamcmd.net/v1/info/581330' | jq -r -e '.data."581330".depots."581333".manifests.public')
EXITSTATUS=$?
if [ $EXITSTATUS -eq 0 ]; then
if [ "$LOCALAPPVER" != "$REMOTEAPPVER" ]; then
/opt/restart-ins.sh
fi
fi
done