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.
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.