wg-installer: fix get_usage function
authorNick Hainke <vincent@systemli.org>
Sat, 13 Mar 2021 19:16:45 +0000 (20:16 +0100)
committerPolynomdivision <vincent@systemli.org>
Sat, 13 Mar 2021 20:21:20 +0000 (21:21 +0100)
The get_usage function always returns 0. The shell syntax was wrong.

Signed-off-by: Nick Hainke <vincent@systemli.org>
net/wg-installer/wg-server/lib/wg_functions.sh

index 6a5646b62b8b9801708fbca3da98d59c3b703d26..65f94e5c2ae787861204a6faf6587c0d57f56384 100644 (file)
@@ -2,7 +2,7 @@
 . /usr/share/wginstaller/wg.sh
 
 wg_get_usage () {
-       num_interfaces = $(wg show interfaces | wc -w)
+       num_interfaces=$(wg show interfaces | wc -w)
        json_init
        json_add_int "num_interfaces" $num_interfaces
        echo $(json_dump)