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. 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. > thanks - Craig -- Tony Dietrich ------------- War is delightful to those who have had no experience of it. -- Desiderius Erasmus