not adding daemons to rc.conf
Karol Kwiatkowski
freebsd at orchid.homeunix.org
Thu Aug 31 12:43:41 UTC 2006
On 31/08/2006 05:25, Daniel Bye wrote:
> On Wed, Aug 30, 2006 at 08:47:06PM -0500, Jonathan Horne wrote:
>> ive noticed that apache can be started manually using the apachectl tool, even> if it is not enabled in /etc/rc.conf. do many other daemons have this
>> ability? i have a dev server that i would like to not have many things
>> enabled in the rc.conf, but i would like an easy way to just start specific
>> daemons when i need.
>
> There is the "force" modifier which may be of help/interest. It works
> like this:
>
> # /usr/local/etc/rc.d/script forcestart
>
> This will, well, force the script to run, even if it's not explicitly
> enabled in /etc/rc.conf.
It does more, it will force the script to run even if a daemon is
running. What OP is looking for is 'one' prefix:
# /usr/local/etc/rc.d/script onestart
# /usr/local/etc/rc.d/script onestop
After rc.subr(8) manpage:
------
run_rc_command argument
[...]
force Skip the checks for rcvar being set to ``YES'', and
sets rc_force=YES. This ignores argument_precmd
returning non-zero, and ignores any of the required_*
tests failing, and always returns a zero exit status.
one Skip the checks for rcvar being set to ``YES'', but
performs all the other prerequisite tests.
------
HTH,
Karol
--
Karol Kwiatkowski <freebsd at orchid dot homeunix dot org>
OpenPGP: http://www.orchid.homeunix.org/carlos/gpg/0x06E09309.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 250 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20060831/89695a33/signature.pgp
More information about the freebsd-questions
mailing list