Auto-restart?
#9

http://forum.sa-mp.com/index.php?topic=31833
^^ restarts every night and moves log to make way for new one

Theres also:

Код:
#!/bin/sh
cd /path/to/server
PROCESS_COUNT=$(ps -fu root | grep serverexe | grep -v grep | wc -l)
case $PROCESS_COUNT in
0) /path/to/server/serverexe &
;;
1) echo OK, program is running once 
;;
*) echo OK, program is already running multiple times 
;;
esac
^ make that something like checksamp.sh in your SAMP directory, and then use a 5 min cron job to run /path/to/server/checksamp.sh
Reply


Messages In This Thread
Auto-restart? - by Acid^^ - 12.11.2006, 02:25
Re: Auto-restart? - by f3llah1n - 12.11.2006, 02:30
Re: Auto-restart? - by Towlies - 12.11.2006, 05:54
Re: Auto-restart? - by Noosferatu - 12.11.2006, 12:54
Re: Auto-restart? - by Acid^^ - 13.11.2006, 20:48
Re: Auto-restart? - by Alejandro - 22.12.2007, 12:37
Re: Auto-restart? - by herbjr - 01.01.2008, 04:25
Re: Auto-restart? - by chrisb345 - 11.06.2008, 18:30
Re: Auto-restart? - by kaisersouse - 11.06.2008, 18:43
Re: Auto-restart? - by d0lph1n - 25.11.2008, 05:08

Forum Jump:


Users browsing this thread: 1 Guest(s)