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} /usr/local/bin/php-cgi"
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 can't be in the command variable. I think you need to write a start function, something like this: start_cmd="phpfastcgi_start" command="/usr/local/bin/php-cgi" phpfastcgi_start(){ echo "starting phpfastcgi." /usr/sbin/daemon -f -p ${pidfile} ${command} } _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"