From 83e6991be967ceaaa8d61167c533636f35d6a498 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Wed, 17 Apr 2024 19:15:35 +0200 Subject: [PATCH] wireguard.cgi: Fix calling wireguardctrl Signed-off-by: Michael Tremer --- html/cgi-bin/wireguard.cgi | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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 -- 2.47.3