#tu.sh
Bascially it's a bunch of spaghetti I made in an afternoon.
It will only shutdown the server and update when the new build is publically avaliable.
##Usage
./tu.sh
Check for a force update file
./tu.sh online
Check build id with lastest public version
##Setup
It requires jq, this is on apt-get or whatever, but not the required versions, download it from github
If someone wants to write something better, comments and forks are appreciated.
Currently, I run tmux within my terminal instead of screen as I see it as a vast improvment.
Using tmux rename-window tower
to rename a window to tower, which tu.sh can use to target and apply commands to stop and start the server.
The commands in the shell file also rely that the window has it's working directory at the main /Tower/
directory of game
The tub
file contains the current build used by the server, which is used to compare against the one stored on the steam server
and the dotush
file is a temporary file that is used to force and update
I have a file on my machine that will create this file over an ssh connection
ssh -t [user]@[address] "touch dotush"
Edit this appropriately to where you want it stored, but be sure to edit the script to compensate
Finally, the use of cron
is used to fire off these commands;
0 * * * * ~/tu.sh online
*/5 * * * * ~/tu.sh
In human terms;
- Check against online bulid every hour on the hour
- Check for a force update file every five minutes
I reinstalled my server and I switched to running every server as a docker instance. I'd like to use your script in a modified form in my dockerfile. Could you please add some form of credit or license head to your script so that you get properly credited?