]> git.ipfire.org Git - people/stevee/ipfire-2.x.git/commitdiff
wireguard.cgi: Fix calling wireguardctrl
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 17 Apr 2024 17:15:35 +0000 (19:15 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 22 Apr 2025 14:47:53 +0000 (16:47 +0200)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
html/cgi-bin/wireguard.cgi

index 63ee141dc7904cd2c888dac707a1beb399243914..c1cc7581d56fb17d837108bea09689a903b83dd0 100644 (file)
@@ -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