Insert determination of the default config

This commit is contained in:
zbchristian 2021-06-12 16:21:20 +02:00 committed by GitHub
parent 4bfbfc40f1
commit 4c79f1f362
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -54,6 +54,8 @@ function DisplayOpenVPNConfig()
$authPassword = next($auth);
}
$clients = preg_grep('/_client.(conf)$/', scandir(pathinfo(RASPI_OPENVPN_CLIENT_CONFIG, PATHINFO_DIRNAME)));
exec("readlink ".RASPI_OPENVPN_CLIENT_CONFIG." | xargs basename", $ret);
$conf_default = empty($ret) ? "none" : $ret[0];
$logEnable = 0;
if (!empty($_POST) && !isset($_POST['log-openvpn'])) {
@ -79,7 +81,8 @@ function DisplayOpenVPNConfig()
"public_ip",
"authUser",
"authPassword",
"clients"
"clients",
"conf_default"
)
);
}