mirror of
https://github.com/RaspAP/raspap-webgui.git
synced 2024-11-22 07:30:23 +00:00
Enable restart when hostapd is active. Addresses #495
This commit is contained in:
parent
897d61d1db
commit
8e29570d07
2 changed files with 3 additions and 2 deletions
|
@ -29,12 +29,12 @@ function DisplayHostAPDConfig()
|
||||||
if (!RASPI_MONITOR_ENABLED) {
|
if (!RASPI_MONITOR_ENABLED) {
|
||||||
if (isset($_POST['SaveHostAPDSettings'])) {
|
if (isset($_POST['SaveHostAPDSettings'])) {
|
||||||
SaveHostAPDConfig($arrSecurity, $arrEncType, $arr80211Standard, $interfaces, $status);
|
SaveHostAPDConfig($arrSecurity, $arrEncType, $arr80211Standard, $interfaces, $status);
|
||||||
} elseif (isset($_POST['StartHotspot'])) {
|
} elseif (isset($_POST['StartHotspot']) || isset($_POST['RestartHotspot'])) {
|
||||||
$status->addMessage('Attempting to start hotspot', 'info');
|
$status->addMessage('Attempting to start hotspot', 'info');
|
||||||
if ($arrHostapdConf['WifiAPEnable'] == 1) {
|
if ($arrHostapdConf['WifiAPEnable'] == 1) {
|
||||||
exec('sudo /etc/raspap/hostapd/servicestart.sh --interface uap0 --seconds 3', $return);
|
exec('sudo /etc/raspap/hostapd/servicestart.sh --interface uap0 --seconds 3', $return);
|
||||||
} else {
|
} 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) {
|
foreach ($return as $line) {
|
||||||
$status->addMessage($line, 'info');
|
$status->addMessage($line, 'info');
|
||||||
|
|
|
@ -446,6 +446,7 @@
|
||||||
echo '<input type="submit" class="btn btn-success" name="StartHotspot" value="' . _("Start hotspot") . '"/>' , PHP_EOL;
|
echo '<input type="submit" class="btn btn-success" name="StartHotspot" value="' . _("Start hotspot") . '"/>' , PHP_EOL;
|
||||||
} else {
|
} else {
|
||||||
echo '<input type="submit" class="btn btn-warning" name="StopHotspot" value="' . _("Stop hotspot") . '"/>' , PHP_EOL;
|
echo '<input type="submit" class="btn btn-warning" name="StopHotspot" value="' . _("Stop hotspot") . '"/>' , PHP_EOL;
|
||||||
|
echo '<input type ="submit" class="btn btn-warning" name="RestartHotspot" value="' . _("Restart hotspot") . '"/>' , PHP_EOL;
|
||||||
};
|
};
|
||||||
endif ?>
|
endif ?>
|
||||||
</form>
|
</form>
|
||||||
|
|
Loading…
Reference in a new issue