Revert back to using /etc/init.d

Don't change too many things at once.
This commit is contained in:
Joe Haig
2016-10-23 20:08:17 +01:00
parent d089dbfe43
commit 2d992fb4ac
5 changed files with 17 additions and 17 deletions

View File

@@ -35,7 +35,7 @@ function DisplayDHCPConfig() {
if ($dnsmasq_state) {
$status->addMessage('dnsmasq already running', 'info');
} else {
exec('sudo service dnsmasq start', $dnsmasq, $return);
exec('sudo /etc/init.d/dnsmasq start', $dnsmasq, $return);
if ($return == 0) {
$status->addMessage('Successfully started dnsmasq', 'success');
$dnsmasq_state = true;
@@ -49,7 +49,7 @@ function DisplayDHCPConfig() {
} elseif( isset($_POST['stopdhcpd'] ) ) {
if (CSRFValidate()) {
if ($dnsmasq_state) {
exec('sudo service dnsmasq stop', $dnsmasq, $return);
exec('sudo /etc/init.d/dnsmasq stop', $dnsmasq, $return);
if ($return == 0) {
$status->addMessage('Successfully stopped dnsmasq', 'success');
$dnsmasq_state = false;