mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-03-01 10:31:47 +00:00
Update svc control init.d w/ systemd
This commit is contained in:
parent
21cff18275
commit
11955a9641
@ -84,7 +84,7 @@ function DisplayDHCPConfig()
|
|||||||
if ($dnsmasq_state) {
|
if ($dnsmasq_state) {
|
||||||
$status->addMessage('dnsmasq already running', 'info');
|
$status->addMessage('dnsmasq already running', 'info');
|
||||||
} else {
|
} else {
|
||||||
exec('sudo /etc/init.d/dnsmasq start', $dnsmasq, $return);
|
exec('sudo /bin/systemctl start dnsmasq.service', $dnsmasq, $return);
|
||||||
if ($return == 0) {
|
if ($return == 0) {
|
||||||
$status->addMessage('Successfully started dnsmasq', 'success');
|
$status->addMessage('Successfully started dnsmasq', 'success');
|
||||||
$dnsmasq_state = true;
|
$dnsmasq_state = true;
|
||||||
@ -94,7 +94,7 @@ function DisplayDHCPConfig()
|
|||||||
}
|
}
|
||||||
} elseif (isset($_POST['stopdhcpd'])) {
|
} elseif (isset($_POST['stopdhcpd'])) {
|
||||||
if ($dnsmasq_state) {
|
if ($dnsmasq_state) {
|
||||||
exec('sudo /etc/init.d/dnsmasq stop', $dnsmasq, $return);
|
exec('sudo /bin/systemctl stop dnsmasq.service', $dnsmasq, $return);
|
||||||
if ($return == 0) {
|
if ($return == 0) {
|
||||||
$status->addMessage('Successfully stopped dnsmasq', 'success');
|
$status->addMessage('Successfully stopped dnsmasq', 'success');
|
||||||
$dnsmasq_state = false;
|
$dnsmasq_state = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user