Update svc control init.d w/ systemd

This commit is contained in:
billz 2019-11-15 09:00:36 +00:00
parent 21cff18275
commit 11955a9641
1 changed files with 2 additions and 2 deletions

View File

@ -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;