OPNsense Forum

Archive => 17.7 Legacy Series => Topic started by: mausy5043 on January 21, 2018, 06:04:51 pm

Title: [CLOSED] Restart dnsmasq from the CLI
Post by: mausy5043 on January 21, 2018, 06:04:51 pm
How do I restart dnsmasq from the CLI?

I've tried:
Code: [Select]
% 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.


Code: [Select]
% configctl dnsmasq restart
Action not found
Was worth a try. But no joy.
Title: Re: Restart dnsmasq from the CLI
Post by: Alphabet Soup on January 22, 2018, 01:30:59 am
'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:

Code: [Select]
% service dnsmasq onerestart
This is not particular to dnsmasq.  It applies to most packages.
Title: Re: Restart dnsmasq from the CLI
Post by: 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
Title: Re: Restart dnsmasq from the CLI
Post by: mausy5043 on January 22, 2018, 06:45:52 pm
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!
Title: Re: [CLOSED] Restart dnsmasq from the CLI
Post by: franco on January 22, 2018, 06:50:55 pm
Happy to help. :)