wlan0: prevent read error when port status is unavailable

This commit is contained in:
bergware
2025-03-11 09:30:33 +01:00
parent 32454ba015
commit 4a8ff20ba0
+1 -1
View File
@@ -53,7 +53,7 @@ while (true) {
$locale_init = _var($display,'locale');
update_translation($locale_init);
}
if (is_readable($ini) && is_readable($wlan0)) {
if (is_readable($ini) && file_exists($wlan0)) {
$wifi = parse_ini_file($ini);
$up = file_get_contents($wlan0)==1;
$alive = $up ? exec("iw wlan0 link 2>/dev/null | grep -Pom1 'SSID: \K.+'") : '';