mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-12-27 07:31:09 +01:00
Revise fetch hostapd logs w/ hotspot->getHostapdLogs()
This commit is contained in:
@@ -135,15 +135,22 @@ function DisplayHostAPDConfig()
|
||||
}
|
||||
}
|
||||
|
||||
// fetch hostapd logs if enabled
|
||||
$logOutput = [];
|
||||
if (!empty($arrHostapdConf['LogEnable']) && (int)$arrHostapdConf['LogEnable'] === 1) {
|
||||
$logResult = $hotspot->getHostapdLogs(5000);
|
||||
if ($logResult['success']) {
|
||||
$joined = implode("\n", $logResult['logs']);
|
||||
$limited = getLogLimited('', $joined);
|
||||
$logOutput = explode("\n", $limited);
|
||||
}
|
||||
}
|
||||
|
||||
// assign disassoc_low_ack boolean if value is set
|
||||
$arrConfig['disassoc_low_ack_bool'] = isset($arrConfig['disassoc_low_ack']) ? 1 : 0;
|
||||
$hostapdstatus = $system->hostapdStatus();
|
||||
$serviceStatus = $hostapdstatus[0] == 0 ? "down" : "up";
|
||||
|
||||
// ensure log is writeable
|
||||
exec('sudo /bin/chmod o+r '.RASPI_HOSTAPD_LOG);
|
||||
$logdata = getLogLimited(RASPI_HOSTAPD_LOG);
|
||||
|
||||
echo renderTemplate(
|
||||
"hostapd", compact(
|
||||
"status",
|
||||
@@ -161,7 +168,7 @@ function DisplayHostAPDConfig()
|
||||
"arrHostapdConf",
|
||||
"operatingSystem",
|
||||
"countryCodes",
|
||||
"logdata"
|
||||
"logOutput"
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user