[CLOSED] Restart dnsmasq from the CLI

Started by mausy5043, January 21, 2018, 06:04:51 PM

Previous topic - Next topic
January 21, 2018, 06:04:51 PM Last Edit: January 22, 2018, 06:46:08 PM by mausy5043
How do I restart dnsmasq from the CLI?

I've tried:

% service dnsmasq restart
Cannot 'restart' dnsmasq. Set dnsmasq_enable to YES in /etc/rc.conf or use 'onerestart' instead of 'restart'.

Given the fact that it is already running I presume a different mechanism is active for starting the daemon, so I dare not follow this instruction.



% configctl dnsmasq restart
Action not found

Was worth a try. But no joy.
:-D  Hobbyist programmer since 1986

'restart' only works if, as it says, dnsmasq_enable="YES" appears in the /etc/rc.conf file.  If it doesn't, you must acknowledge/override this with 'onerestart' instead:

% service dnsmasq onerestart

This is not particular to dnsmasq.  It applies to most packages.

Although we make a point to use the RC system like it is supposed to be used for newer services, older things like Dnsmasq and Unbound are integrated radically different.

Long story short, to restart the DNS subsystem run:

# pluginctl dns

Please don't override rc.conf for anything that has a GUI.


Cheers,
Franco

Quote from: franco on January 22, 2018, 07:05:19 AM
Although we make a point to use the RC system like it is supposed to be used for newer services, older things like Dnsmasq and Unbound are integrated radically different.

Long story short, to restart the DNS subsystem run:

# pluginctl dns

Please don't override rc.conf for anything that has a GUI.


Cheers,
Franco

I asked because something like that was the case here. Thanks!
:-D  Hobbyist programmer since 1986