hi,
can I use the following lines within an already running .sh-script (monitored by /etc/crontab) as kinda startscript that also brings the server back on crash?
if pidof srcds_i686; then
echo srcds laeuft noch
else
cd /home/gameserver/servers/xxx/halflife2
/usr/bin/screen -A -m -d -S server ./srcds_run -game cstrike -ip xxx -port 27015 -tickrate 100 +fps_max 0 +map de_piranesi -maxplayers 35 &
fi
I mean it works and the server comes back after a crash as well -
but I'm just asking because all other startscripts I've seen are much longer and bigger than this. or is there any reason why I should NOT do so as described above?
can I use the following lines within an already running .sh-script (monitored by /etc/crontab) as kinda startscript that also brings the server back on crash?
if pidof srcds_i686; then
echo srcds laeuft noch
else
cd /home/gameserver/servers/xxx/halflife2
/usr/bin/screen -A -m -d -S server ./srcds_run -game cstrike -ip xxx -port 27015 -tickrate 100 +fps_max 0 +map de_piranesi -maxplayers 35 &
fi
I mean it works and the server comes back after a crash as well -
but I'm just asking because all other startscripts I've seen are much longer and bigger than this. or is there any reason why I should NOT do so as described above?