#!/usr/bin/php -q /dev/null &"); } elseif ($arg == 'no') { exec("/etc/rc.d/rc.wireless stop"); exec("$docroot/webGui/scripts/update_services"); } elseif (($wifi['wlan0']['WIFI']??'') == 'yes') { foreach ($wifi as $network => $block) { if ($network == $port) continue; if (($block['GROUP']??'') == $state && (!$arg || $arg == $network)) { $text[] = "SSID=\"$network\""; unset($block['GROUP']); foreach ($block as $key => $value) $text[] = "$key=\"$value\""; } } if (count($text)>2) { if (file_exists($ini)) exec("/etc/rc.d/rc.wireless stop"); file_put_contents_atomic($ini,implode("\n",$text)."\n"); exec("/etc/rc.d/rc.wireless join &>/dev/null &"); exec("$docroot/webGui/scripts/update_services 20"); } } ?>