reread rc.conf without rebooting
FreeBSD at ShaneWare.Biz
Wed Aug 30 05:20:24 UTC 2017
On 30/08/2017 00:31, Ernie Luzar wrote:
> If the local_unbound service is not all ready running the
> "service local_unbound restart" command does not work.
It should, `service x restart` is the same as `service x stop` and then
`service x start` it just saves you doing two steps manually.
> My problem is with the built in unbound. Testing has proven that issuing
> "service local_unbound onestart" before unbound has been first started
> by a reboot is causing config problem generated by unbound first time
> only setup script.
onestart/onerestart is only needed if the rcvar for the service is not
enabled in rc.conf.
> I am trying to debug what is wrong with the config setup for the built
> in version.
What errors are you seeing? anything in the console? /var/log/messages?
Do you have unbound or bind already running? Do you get anything from
sockstat -4 -6 -p 53
> So the answer to my original question is, there is NO way to cause the
> rc.conf file to be reread and re-processed without a reboot.
rc.conf is read when a script using settings contained in it is run.
That is, it is read by `service x start` so any changes saved before you
run `service x start` will be in effect.
You will find all rc scripts will use `load_rc_config` to read in any
config variables they are interested in.
By enabling a service in rc.conf you have to manually start the service
if you don't want to restart the machine. Similarly any config changes
will only be in effect if you manually restart the effected service or
restart the machine.
FreeBSD - the place to B...Software Developing
More information about the freebsd-questions