Fix display of active openvpn config

This commit is contained in:
zbchristian 2021-06-12 14:28:09 +02:00 committed by GitHub
parent 5f7df3accb
commit e62bb9c04e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,6 +7,10 @@
<br><small class="text-muted"><?php echo _("Activating a configuraton will restart the <code>openvpn-client</code> service.") ?></small> <br><small class="text-muted"><?php echo _("Activating a configuraton will restart the <code>openvpn-client</code> service.") ?></small>
</p> </p>
<div class="openvpn-configs js-openvpn-configs-container"> <div class="openvpn-configs js-openvpn-configs-container">
<?php
exec("readlink ".RASPI_OPENVPN_CLIENT_CONFIG." | xargs basename", $ret);
$conf_default = empty($ret) ? "none" : $ret[0];
?>
<?php foreach ($clients as $client) : <?php foreach ($clients as $client) :
if ($client == "client.conf") { if ($client == "client.conf") {
$label = file_get_meta(RASPI_OPENVPN_CLIENT_CONFIG,'#\sfilename\s(.*)'); $label = file_get_meta(RASPI_OPENVPN_CLIENT_CONFIG,'#\sfilename\s(.*)');