mirror of
https://github.com/RaspAP/raspap-webgui.git
synced 2024-11-25 00:50:29 +00:00
Create reinitializeWPA()
This commit is contained in:
parent
c8a9c05d3e
commit
3451efe132
1 changed files with 15 additions and 0 deletions
|
@ -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 a new issue