mirror of
https://github.com/billz/raspap-webgui.git
synced 2023-10-10 13:37:24 +02:00
Add status msg, update shell cmds
This commit is contained in:
parent
79393c48d0
commit
8873735d7f
@ -20,6 +20,7 @@ function DisplayWPAConfig()
|
||||
exec('sudo wpa_cli -i ' . $_SESSION['wifi_client_interface'] . ' select_network '.strval($_POST['connect']));
|
||||
$status->addMessage('New network selected', 'success');
|
||||
} elseif (isset($_POST['wpa_reinit'])) {
|
||||
$status->addMessage('Re-initializing wpa_supplicant', 'info', false);
|
||||
$force_remove=true;
|
||||
$result = reinitializeWPA($force_remove);
|
||||
$status->addMessage($result, 'info');
|
||||
|
@ -165,10 +165,11 @@ function getWifiInterface()
|
||||
function reinitializeWPA($force)
|
||||
{
|
||||
if ($force == true) {
|
||||
$cmd = escapeshellcmd("/bin/rm /var/run/wpa_supplicant/".$_SESSION['wifi_client_interface']);
|
||||
$result = exec($cmd);
|
||||
$cmd = escapeshellcmd("sudo /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']);
|
||||
$cmd = escapeshellcmd("sudo /sbin/wpa_supplicant -B -Dnl80211 -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