Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- (
- flock -x -w 10 200 || exit 1
- cd /home/tf2/
- ./tools/updateCheck/steamUpdateCheck -i /home/tf2/server/.master/tf/steam.inf;
- if [ $? -ne 0 ] || [ "$1" == "force" ]; then
- tmux send-keys -t "xst" "say A TF2 update has been released and the server will attempt to update. Restart your game to grab it." C-m
- ./steamcmd.sh +runscript update_tf_ds.txt;
- ./tools/updatesymlinks.sh;
- sleep 3;
- ./tools/updateCheck/steamUpdateCheck -i /home/tf2/server/.master/tf/steam.inf;
- if [ $? -eq 0 ]; then
- echo " > Update successful. Proceeding to restart process.";
- echo " > 60 second notification...";
- tmux send-keys -t "xst" "say The server was successfully updated and will restart in 60 seconds." C-m;
- sleep 30;
- echo " > 30 second notification...";
- tmux send-keys -t "xst" "say The server was successfully updated and will restart in 30 seconds." C-m;
- sleep 20;
- echo " > 10 second notification...";
- tmux send-keys -t "xst" "say The server was successfully updated and will restart in 10 seconds." C-m;
- sleep 9;
- echo " > Restarting now...";
- tmux send-keys -t "xst" "say The server was successfully updated and will restart now." C-m;
- sleep 1;
- ./tools/allservers.sh hard-restart;
- else
- echo " > Update failed. Not restarting server.";
- fi
- fi
- ) 200>/var/lock/tf2updatecheck
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement