Date: Tue, 05 Oct 2010 20:16:14 +0200 From: Eric Masson <emss@free.fr> To: RW <rwmaillists@googlemail.com> Cc: freebsd-questions@freebsd.org Subject: Re: Custom rc script using /usr/sbin/daemon Message-ID: <8639skmro1.fsf@srvbsdfenssv.interne.associated-bears.org> In-Reply-To: <20101005141158.4730dab3@gumby.homeunix.com> (RW's message of "Tue, 5 Oct 2010 14:11:58 %2B0100") References: <86d3ronb01.fsf@srvbsdfenssv.interne.associated-bears.org> <20101005141158.4730dab3@gumby.homeunix.com>
next in thread | previous in thread | raw e-mail | index | archive | help
RW <rwmaillists@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 ? -+-
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8639skmro1.fsf>
