Jonathon Ross (jross@island.com) said : Re: [syslog-ng]Running syslong-ng from init?
syslog-ng seems to die on me from time to time. (I whish I had more info on why to share with you, but there doesn't seem to be anyting in the logs).
I'd like to run syslog-ng out of init, but I can't seem to find a way to keep it from fork()-ing.
Could anyone offer some advice?
Thanks, -Jon
There was a foreground hack for syslog-ng. But you can use daemontools to make sure it keeps running: http://cr.yp.to/daemontools.html Because syslog-ng goes into the background you need to use fghack (comes with daemontools). Otherwise it'll keep starting syslog-ng processes until you're machine falls over. The /service/syslog-ng/run file would be something like: #!/bin/sh exec fghack /usr/local/sbin/syslog-ng -f /usr/local/etc/syslog-ng.conf Works for us anyway. Cheers, Geoff