You would be far better off NOT using the pipe...  that way if ntop dies,
you retain the info in the log.  All of it.

http://cr.yp.to/daemontools/faq/create.html

It's not real clear in the docs, but see this page for instructions on how
to automatically create the pipe between the service and log process:

http://cr.yp.to/daemontools/svscan.html

"svscan optionally starts a pair of supervise processes, one for a
subdirectory s, one for s/log, with a pipe between them. It does this if the
name s is at most 255 bytes long and s/log exists. (In versions 0.70 and
below, it does this if s is sticky.) svscan needs two free descriptors for
each pipe."

And this:

http://cr.yp.to/daemontools/faq/create.html#runlog


If you get it working, send me a 1/2 page write up and I'll gladly post it.

-----Burton




-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Lombardo,
Federico
Sent: Tuesday, July 02, 2002 9:02 AM
To: '[EMAIL PROTECTED]'
Subject: [Ntop] Starting NTOP with daemontools


I think that is a good idea to start NTOP with daemontools, I provide here a
little (and stupid, of course) script to make it possible.
Just configure ntop with the --prefix=/some/directory/ntop
Then install daemontools and put these lines into your run script:
#!/bin/sh
exec ./bin/ntop -u unprivilegeduser  -i ethX -E -w 3000 -S 1 \
2>&1 | multilog t s10000000000 n20 ./log


Naturally, DJB tells not to use "|" pipes into script, but it work for me,
I'm not smarter as DJB... anyway you can run multilog by another script
(even if you need logging...)
Then ln -s /some/directory/ntop /service
And all goes on :-)

_______________________________________________
Ntop mailing list
[EMAIL PROTECTED]
http://lists.ntop.org/mailman/listinfo/ntop

Reply via email to