Starbound server auto shutdown bash
#!/bin/bash
cd ~/steam/starboundsrv/giraffe_storage/
#Move old logs away
find . -maxdepth 1 | grep 'starbound_server.log.' | xargs -I{} mv {} oldlogs/
#If log was last modified over a couple of hours ago shut down the server
if find . -maxdepth 1 -mmin +120 | grep 'starbound_server.log' ; then
screen -S sb -X stuff $'\003'
fi
Comments