Created
October 4, 2019 10:42
-
-
Save FlowingSPDG/9ecdeda5fee456037933ccc5cd7b4628 to your computer and use it in GitHub Desktop.
CS:GO Server update checker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @ShutdownOnFailedCommand 1 | |
| @NoPromptForPassword 1 | |
| login anonymous | |
| force_install_dir /home/steam/srcds/csgo1/ | |
| app_update 740 | |
| quit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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