Custom rc script using /usr/sbin/daemon

2010-10-05 Thread Eric Masson
Hello, I'm trying to create a script that would launch php-cgi in fastcgi mode. So far, I've the following script : #!/bin/sh # # PROVIDE: phpfastcgi # REQUIRE: DAEMON # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf to enable phpfastcgi : # # phpfastcgi_enable (bool):

Re: Custom rc script using /usr/sbin/daemon

2010-10-05 Thread RW
On Tue, 05 Oct 2010 13:18:38 +0200 Eric Masson e...@free.fr wrote: Hello, I'm trying to create a script that would launch php-cgi in fastcgi mode. So far, I've the following script : ... sig_stop=TERM pidfile=/var/run/${name}/${name}.pid command=/usr/sbin/daemon -f -p ${pidfile}

Re: Custom rc script using /usr/sbin/daemon

2010-10-05 Thread Eric Masson
RW rwmailli...@googlemail.com writes: Hello, I don't think you can do it like that. IIRC when you try to stop a daemon it doesn't just kill the process by pid, it also sanity checks the command in case the daemon has died and the pid was reused. Since daemon wont show-up in the ps output it