PDA

View Full Version : [CS:GO] Linux restart script.


asdfxD
03-11-2016, 02:19
hi,

i need help with a restart script.
i tried with crontab but it seems not working.

00 6 * * * csgo-server /home/csgo-server/server1/stop.sh || /home/csgo-server/server1/start.sh

it works, the server goes offline but does not restart. when i type in putty ./start.sh the server starts fine.

stop.sh

#!/bin/bash
screen -r csgo -X quit
exit 0

start.sh

#!/bin/bash
screen -A -m -d -L -S csgo ./srcds_run -game csgo -ip XXX.XX.XXX.XXX -port 27015 -maxplayers_override 24 -console -tickrate 128 -usercon +game_type 0 +game_mode 0 +mapgroup mg_active +map de_dust2 +sv_setsteamaccount XXXXXXXXXXXXXXXX +servercfgfile server.cfg

and for some reason when i use "rcon _restart" my server goes just down without restarting it, thats why i need a script.

LeetDonkey
03-11-2016, 02:41
I use the script by daniel gibbs:
http://gameservermanagers.com/lgsm/csgoserver/

This has all the functionality you ask for, it even has a monitorsystem that you can set up in cron.

asdfxD
03-11-2016, 04:25
I use the script by daniel gibbs:
http://gameservermanagers.com/lgsm/csgoserver/

This has all the functionality you ask for, it even has a monitorsystem that you can set up in cron.

thanks.

i figured out, i forgot to add -autoupdate in command line. now server restarts with _restart or quit. :D