Fix display of VPN IPs

This commit is contained in:
Christian Zeitnitz
2021-07-21 17:56:01 +02:00
parent 393292f872
commit 0a6e48a953
2 changed files with 2 additions and 1 deletions

View File

@@ -131,6 +131,7 @@ function getVPN_IPs() {
# get openvpn server IPs for UDP (if existing)
if ( RASPI_OPENVPN_ENABLED && ($fconf = glob(RASPI_OPENVPN_CLIENT_PATH ."/*.conf")) !== false && !empty($fconf) ) {
foreach ( $fconf as $f ) {
unset($result);
exec('cat '.$f.' | sed -rn "s/^remote\s*([a-z0-9\.\-\_]*)\s*([0-9]*).*$/\1/ip" ', $result);
$ip = (isset($result[0])) ? $result[0] : "";
unset($result);