Page 1 of 1

Automatically Restarting POL on Linux?

PostPosted: Sun May 16, 2004 10:26 pm
by dw3rby
How would I go about doing this? Obviously, I can't use drockets batch file, and my brother tried writing a little program for it, but the program crashes sometimes, so obviously thats no good. Does anyone have any good suggestions?

PostPosted: Mon May 17, 2004 9:46 pm
by Caramon
I used to run a cron task to make sure that the process was still running, then start it if the task wasn't. its been so long since I did any shell programming, I can't remember how i did it. Basically I piped a 'ps -ef | grep 'prog-name' ' into a temp text file, then I did a search of the file. If I found the entire name (I would do a partial search, as the search itself shows up as a process, so the file will always have at least one entry in it). If it didn't find the process running, the shell script would then launch the pol process again. Hope that helps.