Skip to content

Instantly share code, notes, and snippets.

@FlowingSPDG
Created October 4, 2019 10:42
Show Gist options
  • Save FlowingSPDG/9ecdeda5fee456037933ccc5cd7b4628 to your computer and use it in GitHub Desktop.
Save FlowingSPDG/9ecdeda5fee456037933ccc5cd7b4628 to your computer and use it in GitHub Desktop.
CS:GO Server update checker
@ShutdownOnFailedCommand 1
@NoPromptForPassword 1
login anonymous
force_install_dir /home/steam/srcds/csgo1/
app_update 740
quit
#!/bin/bash
. ./csgo/steam.inf;
SteamCmdDir="/home/steam/steamcmd/steamcmd.sh"
UpdateScript=`pwd`
UpdateScript+="/autoupdate.txt"
PatchVersion=${PatchVersion//./};
PatchVersion=`echo ${PatchVersion} | sed -e "s/[\r\n]\+//g"`
#echo $PatchVersion
url="api.steampowered.com/ISteamApps/UpToDateCheck/v1?appid=730&version=${PatchVersion}&format=json";
up_to_date=`curl -X GET $url | jq ".response" | jq ".up_to_date"`;
#echo $up_to_date
if [ $up_to_date == "false" ]; then
echo "You need to update your SRCDS!"
$SteamCmdDir +runscript $UpdateScript
elif [ $up_to_date == "true" ]; then
echo "You have latest SRCDS ver"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment