mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-03-01 10:31:47 +00:00
Update exec mullvad connect w/ location set
This commit is contained in:
parent
0136c32403
commit
574113bf28
@ -112,14 +112,12 @@ function saveProviderConfig($status, $binPath, $country, $id = null)
|
|||||||
{
|
{
|
||||||
$status->addMessage(sprintf(_('Attempting to connect to %s'),$country), 'info');
|
$status->addMessage(sprintf(_('Attempting to connect to %s'),$country), 'info');
|
||||||
$cmd = getCliOverride($id, 'cmd_overrides', 'connect');
|
$cmd = getCliOverride($id, 'cmd_overrides', 'connect');
|
||||||
if ($id == 2) { // mullvad requires location set
|
// mullvad requires relay set location before connect
|
||||||
exec("sudo $binPath set location $country", $return);
|
if ($id == 2) {
|
||||||
sleep(1);
|
exec("sudo $binPath relay set location $country", $return);
|
||||||
exec("sudo $binPath $cmd $country", $return);
|
exec("sudo $binPath $cmd", $return);
|
||||||
sleep(3); // required for connect delay
|
|
||||||
} else {
|
} else {
|
||||||
exec("sudo $binPath $cmd $country", $return);
|
exec("sudo $binPath $cmd $country", $return);
|
||||||
sleep(3);
|
|
||||||
}
|
}
|
||||||
$return = stripArtifacts($return);
|
$return = stripArtifacts($return);
|
||||||
foreach ($return as $line) {
|
foreach ($return as $line) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user