def _do_dnsmasq_stop(self): if linux.is_systemd_enabled(): cmd = shell.ShellCmd('systemctl stop dnsmasq') else: cmd = shell.ShellCmd('/etc/init.d/dnsmasq stop') return cmd(False)
def _do_dnsmasq_restart(self): if linux.is_systemd_enabled(): shell.call('systemctl restart dnsmasq') else: shell.call('/etc/init.d/dnsmasq restart')