mirror of
https://github.com/billz/raspap-webgui.git
synced 2023-10-10 13:37:24 +02:00
Create reinitializeWPA()
This commit is contained in:
parent
c8a9c05d3e
commit
3451efe132
@ -157,3 +157,18 @@ function getWifiInterface()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Reinitializes wpa_supplicant for the wifi client interface
|
||||||
|
*
|
||||||
|
* @param boolean $force
|
||||||
|
*/
|
||||||
|
function reinitializeWPA($force)
|
||||||
|
{
|
||||||
|
if ($force == true) {
|
||||||
|
$cmd = escapeshellcmd("/bin/rm /var/run/wpa_supplicant/".$_SESSION['wifi_client_interface']);
|
||||||
|
$result = exec($cmd);
|
||||||
|
}
|
||||||
|
$cmd = escapeshellcmd("sudo /sbin/wpa_supplicant -B -Dnl80211 -Dwext c/etc/wpa_supplicant/wpa_supplicant.conf -i". $_SESSION['wifi_client_interface']);
|
||||||
|
$result = shell_exec($cmd);
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user