Server autorestarter - Linux (centos 6)? Wiki solutions don't work. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Server (
https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (
https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: Server autorestarter - Linux (centos 6)? Wiki solutions don't work. (
/showthread.php?tid=403334)
Server autorestarter - Linux (centos 6)? Wiki solutions don't work. -
im - 29.12.2012
Hello.
Is there any working solutions to have the server auto-restart when it crashes?
I've red this:
https://sampwiki.blast.hk/wiki/Linux_Ser..._Server_Online, but no solution does work for me. When I use sh restart.sh or sh check.sh, I get errors like 'unextected end of file' or 'unextected symbol done'..
Does anyone have a working linux script that I can use to keep my server online?
My server is hosted on a linux VPS that uses centos 6.
Thanks!
Edit: I managed to do that using a PHP cron job + samp rcon api + samp ssh api, but I doubt it that that's the best way to do it.