From 8e29570d073e5af7e7a85582d8a18938012e7510 Mon Sep 17 00:00:00 2001 From: billz Date: Tue, 18 Feb 2020 21:01:38 +0000 Subject: [PATCH] Enable restart when hostapd is active. Addresses #495 --- includes/hostapd.php | 4 ++-- templates/hostapd.php | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/hostapd.php b/includes/hostapd.php index b7beb5b7..482b12d5 100755 --- a/includes/hostapd.php +++ b/includes/hostapd.php @@ -29,12 +29,12 @@ function DisplayHostAPDConfig() if (!RASPI_MONITOR_ENABLED) { if (isset($_POST['SaveHostAPDSettings'])) { SaveHostAPDConfig($arrSecurity, $arrEncType, $arr80211Standard, $interfaces, $status); - } elseif (isset($_POST['StartHotspot'])) { + } elseif (isset($_POST['StartHotspot']) || isset($_POST['RestartHotspot'])) { $status->addMessage('Attempting to start hotspot', 'info'); if ($arrHostapdConf['WifiAPEnable'] == 1) { exec('sudo /etc/raspap/hostapd/servicestart.sh --interface uap0 --seconds 3', $return); } else { - exec('sudo /etc/raspap/hostapd/servicestart.sh --seconds 5', $return); + exec('sudo /etc/raspap/hostapd/servicestart.sh --seconds 3', $return); } foreach ($return as $line) { $status->addMessage($line, 'info'); diff --git a/templates/hostapd.php b/templates/hostapd.php index 591b2f05..6fcdb1db 100755 --- a/templates/hostapd.php +++ b/templates/hostapd.php @@ -446,6 +446,7 @@ echo '' , PHP_EOL; } else { echo '' , PHP_EOL; + echo '' , PHP_EOL; }; endif ?>