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!
while true; do
TOTAL=0
# TOTAL=0
sleep $(((RANDOM % 360) + 60))
for rconip in $(echo "${rconlist//,/ }"); do
PLAYERSCOUNT=$(rcon -a "$rconip" -p "$rconpass" listplayers | tail -n +3 | wc -l)
TOTAL=$(("$PLAYERSCOUNT" + "$TOTAL"))
done
#CHECKING NEW GAME VERSION
if [ $TOTAL -eq 0 ]; then
# for rconip in $(echo "${rconlist//,/ }"); do
# PLAYERSCOUNT=$(rcon -a "$rconip" -p "$rconpass" listplayers | tail -n +3 | wc -l)
# TOTAL=$(("$PLAYERSCOUNT" + "$TOTAL"))
# done
# if [ $TOTAL -eq 0 ]; then
#CHECKING NEW GAME 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')
EXITSTATUS=$?
@ -40,5 +40,5 @@ while true; do
fi
fi
fi
fi
# fi
done