let me tell you what i want. Do you remember what i was talking about a few posts back? the ODT to PDF thing from the command line?
well apparently if you want to batch convert documents, each document would start an instance of OO, get converted, then shut OO down.
So i thought of having a daemon that would start OO, and then the batch convert would find a running instance and would connect to it. and restart if something crashes along the way.
So, since the program i need to run is OO, i believe there should be a pid file for it, right? (just to be sure, those are the ones located in /var/run/XX.pid, right?)
I don't know anything about DJB, but googling a bit turned out a few hits, sounds interesting.
thanx for your help...
On 12/26/05, Yaman Saqqa <[EMAIL PROTECTED]> wrote:
Hi Faisal,
What you run in a cron job is essentially a shell script that does all
the logic. All crond does is schedule it!
What you wanna do depends on the daemon, does it write a pid file that
u can check for or not. Is it a single process or no ... you can use
pgrep to check the process list, stat to check for the pid file or a
combination of both.
The best approach IMHO is to use DJB's daemontools. It automatically
starts the process for you and watches it, if it goes down, brings it
up again and gets u some decent logging.
Just my 2 cents as I have to roll.
Later,
On 12/26/05, Al-Faisal El-Dajani <[EMAIL PROTECTED]> wrote:
> Hey guys,
>
> I need to write some kind of a daemon, that would check to see if a certain
> program is up or not, and if it is not running smoothly, the daemon would
> restart the program. Any clues of how to go about it?
>
> I though of doing it using a cron job, but can a cron detect crashes and
> restart things?
>
> --
> Al-Faisal El-Dajani
> Tel: +962-7-77 799 781
> P.O Box: 140056
> 11814 Amman, Jordan
>
> May the source be with you
> _______________________________________________
> General mailing list
> [email protected]
> http://mail.jolug.org/mailman/listinfo/general_jolug.org
>
>
>
--
abulyomon
www.KiLLTHeUPLiNK.com
_______________________________________________
General mailing list
[email protected]
http://mail.jolug.org/mailman/listinfo/general_jolug.org
--
Al-Faisal El-Dajani
Tel: +962-7-77 799 781
P.O Box: 140056
11814 Amman, Jordan
May the source be with you
_______________________________________________ General mailing list [email protected] http://mail.jolug.org/mailman/listinfo/general_jolug.org
