mirror of
https://github.com/unraid/webgui.git
synced 2026-01-08 02:29:51 -06:00
Code fixes
This commit is contained in:
@@ -76,11 +76,12 @@ switch ($cmd) {
|
||||
case 'list':
|
||||
$title = _('Connect to WiFi network');
|
||||
$port = array_key_first($wifi);
|
||||
$carrier = "/sys/class/net/$port/carrier";
|
||||
$wlan = scanWifi($port);
|
||||
$echo = [];
|
||||
$index = 0;
|
||||
if (count(array_column($wlan,'ssid'))) {
|
||||
$up = file_get_contents("/sys/class/net/$port/carrier") == 1;
|
||||
$up = file_exists($carrier) && file_get_contents($carrier)==1;
|
||||
$alive = $up ? exec("iw ".escapeshellarg($port)." link | grep -Pom1 'SSID: \K.+'") : '';
|
||||
$state = $up ? _('Connected') : _('Disconnected');
|
||||
$color = $up ? 'blue' : 'red';
|
||||
|
||||
Reference in New Issue
Block a user