check-manifest update

This commit is contained in:
Andrew Marchukov 2021-05-01 16:36:33 +03:00
parent ffb41df2aa
commit d43c6e4d0f

View file

@ -4,14 +4,14 @@ rconpass=my_rcon_password
modio_api_key=my_modio_apikey_!NOT_OAuth2_KEY! modio_api_key=my_modio_apikey_!NOT_OAuth2_KEY!
while true; do while true; do
TOTAL=0 # TOTAL=0
sleep $(((RANDOM % 360) + 60)) sleep $(((RANDOM % 360) + 60))
for rconip in $(echo "${rconlist//,/ }"); do # for rconip in $(echo "${rconlist//,/ }"); do
PLAYERSCOUNT=$(rcon -a "$rconip" -p "$rconpass" listplayers | tail -n +3 | wc -l) # PLAYERSCOUNT=$(rcon -a "$rconip" -p "$rconpass" listplayers | tail -n +3 | wc -l)
TOTAL=$(("$PLAYERSCOUNT" + "$TOTAL")) # TOTAL=$(("$PLAYERSCOUNT" + "$TOTAL"))
done # done
# if [ $TOTAL -eq 0 ]; then
#CHECKING NEW GAME VERSION #CHECKING NEW GAME VERSION
if [ $TOTAL -eq 0 ]; then
LOCALAPPVER=$(cat /opt/sandstorm-server.version) 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') REMOTEAPPVER=$(curl -s -X GET 'https://api.steamcmd.net/v1/info/581330' | jq -r -e '.data."581330".depots."581333".manifests.public')
EXITSTATUS=$? EXITSTATUS=$?
@ -40,5 +40,5 @@ while true; do
fi fi
fi fi
fi fi
fi # fi
done done