SRCDS Steam group

Restart server script

I search a script, that can auto restart my server when it get crashed..

Example: My server say: Connection Problem. Then my server have to restart it selves.

Sry for my bad english.. Big Grin

And btw... I'm new at linux. It must be a very easy script Smile
#test if you are root, when true exit
[[ "`whoami`" = "root" ]] && echo "Don't run your Server as root!" && exit

#change directory to your server, don't forget orangebox
cd /home/server_xyz/orangebox
screen -mdS server_xyz ./srcds_run -autoupdate -ip -port 270xx -game cstrike -maxplayers 12 +map de_dust

chmod u+x


The script doesn't check if your Server is already running.
The option -autoupdate restarts the Server, when your server ist restarted via quit or crashed.
The check if your server is running, makes the script a little bit bigger.

You can find an complex script at:

The description is in german, but i've written the script in english. This script works with config files. You only need to edit the configfiles in startscript, for your server(s). In next version i will fix a little Bug, with the status command in the script. The command calls an old function, which I've deleted.

Forum Jump:

Users browsing this thread: 1 Guest(s)