mirror of
https://github.com/RaspAP/raspap-webgui.git
synced 2024-11-25 00:50:29 +00:00
Update method to determine wg-quick state, resolves #1601
This commit is contained in:
parent
6541e9b2e1
commit
828a463888
1 changed files with 3 additions and 3 deletions
|
@ -64,9 +64,9 @@ function DisplayWireGuardConfig()
|
||||||
}
|
}
|
||||||
|
|
||||||
// fetch service status
|
// fetch service status
|
||||||
exec('pidof wg-crypt-wg0 | wc -l', $wgstatus);
|
exec('systemctl is-active wg-quick@wg0', $wgstatus);
|
||||||
$serviceStatus = $wgstatus[0] == 0 ? "down" : "up";
|
$serviceStatus = $wgstatus[0] == 'inactive' ? "down" : "up";
|
||||||
$wg_state = ($wgstatus[0] > 0);
|
$wg_state = ($wgstatus[0] == 'active' ? true : false );
|
||||||
$public_ip = get_public_ip();
|
$public_ip = get_public_ip();
|
||||||
|
|
||||||
echo renderTemplate(
|
echo renderTemplate(
|
||||||
|
|
Loading…
Reference in a new issue