Automatically Restarting POL on Linux?

For questions relating to POL scripting (not necessarily related to WoD)

Moderators: Siobhan, Sebastian, Drocket

Automatically Restarting POL on Linux?

Postby dw3rby on Sun May 16, 2004 10:26 pm

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?
dw3rby
Sr. Newbie
 
Posts: 20
Joined: Mon Dec 01, 2003 3:42 am

Postby Caramon on Mon May 17, 2004 9:46 pm

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.
Caramon
Jr. Assistant Regular Poster
 
Posts: 63
Joined: Sat Feb 14, 2004 7:54 am
Location: Texas


Return to Scripting Forum

Who is online

Users browsing this forum: No registered users and 0 guests

cron