rc script problem - pidfile not being recognised
Jim Trigg
jktrigg at gmail.com
Tue Sep 15 05:08:05 UTC 2015
On 2015-09-14 13:32, RW via freebsd-ports wrote:
> On Sat, 12 Sep 2015 08:02:11 -0700 (PDT)
> Roger Marquis wrote:
>
>> RW via freebsd-ports wrote:
>> > You'd rather an rc script fails at run-time and shuts down the wrong
>> > daemon than fail when the script is being developed?
>>
>> It's not so much where the script fails than that it fails in the
>> first place. Neither a pidfile nor a command_interpreter needs to be
>> required for an rc scripts to work. These are nice features but
>> making them mandatory is at best a sort of premature optimization.
>
> It's not mandatory; you only need to define it if you want to be
> able to stop an interpreted daemon using the default method.
>
> If you have some other way of shutting down a daemon without knowing
> its
> name and PID then you can just supply a stop function to do it.
One easy fix would be to have stoprc first check the entire process
command and then shift it by one and check again... Then it would work
for both binaries and scripts without a special variable for scripts.
Jim Trigg
More information about the freebsd-ports
mailing list