From c29a07b2ee505811a6cd78ca643bf816beb77375 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Mon, 26 May 2025 11:38:57 +0200 Subject: [PATCH] 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 --- html/cgi-bin/index.cgi | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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'} -- 2.39.5