diff --git a/includes/dhcp.php b/includes/dhcp.php
index f209813e..a4b06f76 100755
--- a/includes/dhcp.php
+++ b/includes/dhcp.php
@@ -37,6 +37,18 @@ function DisplayDHCPConfig()
$status->addMessage('Failed to start dnsmasq', 'danger');
}
}
+ } elseif (isset($_POST['restartdhcpd'])) {
+ if ($dnsmasq_state) {
+ exec('sudo /bin/systemctl restart dnsmasq.service', $dnsmasq, $return);
+ if ($return == 0) {
+ $status->addMessage('Successfully restarted dnsmasq', 'success');
+ $dnsmasq_state = false;
+ } else {
+ $status->addMessage('Failed to restart dnsmasq', 'danger');
+ }
+ } else {
+ $status->addMessage('dnsmasq already stopped', 'info');
+ }
} elseif (isset($_POST['stopdhcpd'])) {
if ($dnsmasq_state) {
exec('sudo /bin/systemctl stop dnsmasq.service', $dnsmasq, $return);
diff --git a/templates/dhcp.php b/templates/dhcp.php
index b83a6444..9e5803f9 100755
--- a/templates/dhcp.php
+++ b/templates/dhcp.php
@@ -3,6 +3,7 @@
" name="savedhcpdsettings" />
" name="stopdhcpd" />
+ " name="restartdhcpd" />
" name="startdhcpd" />