Custom rc script using /usr/sbin/daemon
Eric Masson
emss at free.fr
Tue Oct 5 18:16:26 UTC 2010
RW <rwmaillists at 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 can't be in the command
> variable.
Ok, makes sense.
> 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}
> }
Fine, it works much better now.
Thanks a lot
Kind Regards
Éric Masson
--
je n'ai jamais repondu aux AAD car je pensais qu'on pouvais pas en tant
que personne qui propose un newgroup...
-+- A in GNU : C'est quoi un groupe de discussion d'ailleurs ? -+-
More information about the freebsd-questions
mailing list