add server name arg

This commit is contained in:
Philipp 2022-10-11 23:04:47 +02:00
parent 9c8cd2ee36
commit 24ee1df599
Signed by: Philipp
GPG key ID: 9EBD8439AFBAB750

View file

@ -14,7 +14,7 @@ then
echo "Server is up to date, nothin todo."
else
new_version=`curl -s "https://api.steampowered.com/ISteamApps/UpToDateCheck/v1/?appid=440&version=${version}" | jq -r .response.required_version`
echo "There has been an update, server version: ${version}, newest version: ${new_version}":
curl -H "Content-Type: application/json" -d "{\"username\": \"Server Updater\", \"content\": \"There has been an update, server version: $version, newest version: $new_version\"}" $discord_webhook
echo "$2: There has been an update, server version: ${version}, newest version: ${new_version}":
curl -H "Content-Type: application/json" -d "{\"username\": \"Server Updater\", \"content\": \"$2: There has been an update, server version: $version, newest version: $new_version\"}" $discord_webhook
(cd ~/docker/tf2; docker compose exec tf2dm-1 ./rcon -H 88.198.49.46 -p $1 -P $rcon_password changelevel cp_process_final)
fi