From: Michael Tremer Date: Mon, 26 May 2025 09:38:57 +0000 (+0200) Subject: index.cgi: Show WireGuard status using the function library X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c29a07b2ee505811a6cd78ca643bf816beb77375;p=ipfire-2.x.git index.cgi: Show WireGuard status using the function library The settings file is also loaded all the time and we don't need to load it again. Signed-off-by: Michael Tremer --- diff --git a/html/cgi-bin/index.cgi b/html/cgi-bin/index.cgi index e28629cc9..7eafd784c 100644 --- a/html/cgi-bin/index.cgi +++ b/html/cgi-bin/index.cgi @@ -30,6 +30,7 @@ use Sort::Naturally; require '/var/ipfire/general-functions.pl'; require "${General::swroot}/lang.pl"; require "${General::swroot}/header.pl"; +require "${General::swroot}/wireguard-functions.pl"; require "/opt/pakfire/lib/functions.pl"; my %cgiparams=(); @@ -39,7 +40,6 @@ my %netsettings=(); my %ddnssettings=(); my %proxysettings=(); my %vpnsettings=(); -my %wgsettings=(); my %vpnconfig=(); my %ovpnconfig=(); my $warnmessage = ''; @@ -61,7 +61,6 @@ $pppsettings{'PROFILENAME'} = 'None'; &General::readhash("${General::swroot}/ddns/settings", \%ddnssettings); &General::readhash("${General::swroot}/proxy/advanced/settings", \%proxysettings); &General::readhash("${General::swroot}/vpn/settings", \%vpnsettings); -&General::readhash("${General::swroot}/wireguard/settings", \%wgsettings); my %color = (); my %mainsettings = (); @@ -373,9 +372,9 @@ print < $Lang::tr{'wg'}