From 80b0634d2d215f2acc7fb2fdeb3433b66d96e6cd Mon Sep 17 00:00:00 2001 From: Taikuh Date: Mon, 23 Mar 2020 20:41:06 +0800 Subject: [PATCH] corrected hostapd toggle display --- includes/hostapd.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/includes/hostapd.php b/includes/hostapd.php index 8a351fba..ad321dbf 100755 --- a/includes/hostapd.php +++ b/includes/hostapd.php @@ -12,7 +12,6 @@ function DisplayHostAPDConfig() { $status = new StatusMessages(); $system = new System(); - $arrHostapdConf = parse_ini_file('/etc/raspap/hostapd.ini'); $arrConfig = array(); $arr80211Standard = [ 'a' => '802.11a - 5 GHz', @@ -29,7 +28,13 @@ function DisplayHostAPDConfig() if (!RASPI_MONITOR_ENABLED) { if (isset($_POST['SaveHostAPDSettings'])) { SaveHostAPDConfig($arrSecurity, $arrEncType, $arr80211Standard, $interfaces, $status); - } elseif (isset($_POST['StartHotspot']) || isset($_POST['RestartHotspot'])) { + } + } + + $arrHostapdConf = parse_ini_file('/etc/raspap/hostapd.ini'); + + if (!RASPI_MONITOR_ENABLED) { + if (isset($_POST['StartHotspot']) || isset($_POST['RestartHotspot'])) { $status->addMessage('Attempting to start hotspot', 'info'); if ($arrHostapdConf['BridgedEnable'] == 1) { exec('sudo /etc/raspap/hostapd/servicestart.sh --interface br0 --seconds 3', $return);