From 11955a964172edbfe11cd24af513d33b879df777 Mon Sep 17 00:00:00 2001 From: billz Date: Fri, 15 Nov 2019 09:00:36 +0000 Subject: [PATCH] Update svc control init.d w/ systemd --- includes/dhcp.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/dhcp.php b/includes/dhcp.php index 638efda1..3ecfd797 100755 --- a/includes/dhcp.php +++ b/includes/dhcp.php @@ -84,7 +84,7 @@ function DisplayDHCPConfig() if ($dnsmasq_state) { $status->addMessage('dnsmasq already running', 'info'); } else { - exec('sudo /etc/init.d/dnsmasq start', $dnsmasq, $return); + exec('sudo /bin/systemctl start dnsmasq.service', $dnsmasq, $return); if ($return == 0) { $status->addMessage('Successfully started dnsmasq', 'success'); $dnsmasq_state = true; @@ -94,7 +94,7 @@ function DisplayDHCPConfig() } } elseif (isset($_POST['stopdhcpd'])) { if ($dnsmasq_state) { - exec('sudo /etc/init.d/dnsmasq stop', $dnsmasq, $return); + exec('sudo /bin/systemctl stop dnsmasq.service', $dnsmasq, $return); if ($return == 0) { $status->addMessage('Successfully stopped dnsmasq', 'success'); $dnsmasq_state = false;