From: Michael Tremer Date: Wed, 17 Apr 2024 17:15:35 +0000 (+0200) Subject: wireguard.cgi: Fix calling wireguardctrl X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=83e6991be967ceaaa8d61167c533636f35d6a498;p=people%2Fstevee%2Fipfire-2.x.git wireguard.cgi: Fix calling wireguardctrl Signed-off-by: Michael Tremer --- diff --git a/html/cgi-bin/wireguard.cgi b/html/cgi-bin/wireguard.cgi index 63ee141dc..c1cc7581d 100644 --- a/html/cgi-bin/wireguard.cgi +++ b/html/cgi-bin/wireguard.cgi @@ -74,9 +74,9 @@ if ($cgiparams{"ACTION"} eq $Lang::tr{'save'}) { # Start if enabled if ($settings{'ENABLED'} eq "on") { - &General::system("/usr/local/bin/wireguardctl", "start"); + &General::system("/usr/local/bin/wireguardctrl", "start"); } else { - &General::system("/usr/local/bin/wireguardctl", "stop"); + &General::system("/usr/local/bin/wireguardctrl", "stop"); } } @@ -320,8 +320,7 @@ sub dump($) { my $lineno = 0; # Fetch the dump - #my @output = &General::system_output("wg", "show", $intf, "dump"); - my @output = &General::system_output("cat", "/tmp/wg.dump"); + my @output = &General::system_output("/usr/local/bin/wireguardctrl", "dump", $intf); foreach my $line (@output) { # Increment the line numbers