|
Monitor and Restart - Bkg Processes?
Hello again. I posted yesterday and got a quick response of exactly what I was looking for. Had another question.
I have written a basic bash script which runs 'wget' in a loop to get remote .jpg images off a camera feed. I run the script with the "&" following it so it drops into the background. The script should continue to run in a loop as long as the box is up.
I've been running it over 24 hrs now without a problem. My question is, is there some way to monitor this bkg process and auto restart it if it dies for some reason? Basically a deamon of some sort that says "if process XXX running, do nothing, else, start process XXX into the background".
I would also like to write something that checks the incomming directory for the wget files and if the file isn't updated in xxx seconds, kill and restart the script.
Thanks again for any help! I am a 5+ year Windows developer, forced onto a Linux box for a project 6 months ago and I LOVE everything about L so far. Still learning my way around, but I'll have all my other projects converted to L based servers within the next year.
-K
Last edited by KendersPlace; 02-15-2003 at 01:11 AM.
|