On Thu, 2005-01-27 at 08:52 +0000, Tony Dietrich wrote: > On Thursday 27 Jan 2005 07:34, Craig White wrote: > > Trying to use relaydelay.pl from projects.puremagic.com (greylisting > > milter for sendmail) > > > > End result is a perl file... and I want to invoke it as a daemon - > > detached from any terminal. > > > > it appears that most of the sysv scripts use /etc/rc.d/init.d/functions > > to get a more sophisticated box of tools... > > > > my problem is that my sysv script (called relay) hangs at the point > > where it wants to initlog -q -c /usr/local/sbin/relaydelay.pl and > > this obviously comes from the code in /etc/rc.d/init.d/functions. If I > > kill the neverending process...everything is fine and the program is > > launched BUT - it never detaches from the terminal. i.e. > > > Looks like the script isn't set to act as a daemon. Its the script mean to > run when called from your MTA? As I recall, you edit the config for the MTA > to include the script. ---- I didn't see anything in the INSTALL - FAQ - or code that would indicate that. The script doesn't appear to be meant to act as a daemon. I am trying to make it so...hence my fooling around in previous uncharted water called initscripts - though it seems as though if I hack a copy of /etc/rc.d/init.d/functions to make it skip the initlog -q, it might work but that seems to run in the face of standardization and thought that someone on this list would be familiar with the initscripts stuff enough to 'splain it to me in bite size knowledge chunks ---- > > If I'm wrong, then what you need to do it re-write your init script to detach > the process into the background ... but that means that you would have to > bring it into the foreground to kill it .. not as simple as daemoning it. > > However, I *think* there's a package somewhere that includes a 'daemonising' > program. > > It takes a single argument, the name of the process to daemonise, and runs > that process as a child process. I'll take a look later. ---- This may be what I need - I am not familiar enough with this entire process at all Craig