summaryrefslogtreecommitdiffhomepage
path: root/protocols/luci-proto-wireguard/root/usr
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/luci-proto-wireguard/root/usr')
-rwxr-xr-xprotocols/luci-proto-wireguard/root/usr/libexec/rpcd/luci.wireguard26
-rw-r--r--protocols/luci-proto-wireguard/root/usr/share/rpcd/acl.d/luci-wireguard.json5
2 files changed, 4 insertions, 27 deletions
diff --git a/protocols/luci-proto-wireguard/root/usr/libexec/rpcd/luci.wireguard b/protocols/luci-proto-wireguard/root/usr/libexec/rpcd/luci.wireguard
deleted file mode 100755
index a6c951f3de..0000000000
--- a/protocols/luci-proto-wireguard/root/usr/libexec/rpcd/luci.wireguard
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-. /usr/share/libubox/jshn.sh
-
-case "$1" in
- list)
- json_init
- json_add_object "generateKeyPair"
- json_close_object
- json_dump
- ;;
- call)
- case "$2" in
- generateKeyPair)
- prv=$(wg genkey)
- pub=$(echo $prv | wg pubkey)
- json_init
- json_add_object "keys"
- json_add_string "priv" "$prv"
- json_add_string "pub" "$pub"
- json_close_object
- json_dump
- ;;
- esac
- ;;
-esac
diff --git a/protocols/luci-proto-wireguard/root/usr/share/rpcd/acl.d/luci-wireguard.json b/protocols/luci-proto-wireguard/root/usr/share/rpcd/acl.d/luci-wireguard.json
index 4bbcb81578..04877d4f49 100644
--- a/protocols/luci-proto-wireguard/root/usr/share/rpcd/acl.d/luci-wireguard.json
+++ b/protocols/luci-proto-wireguard/root/usr/share/rpcd/acl.d/luci-wireguard.json
@@ -3,7 +3,10 @@
"description": "Grant access to LuCI Wireguard procedures",
"write": {
"ubus": {
- "luci.wireguard": [ "generateKeyPair" ]
+ "luci.wireguard": [
+ "generateKeyPair",
+ "generateQrCode"
+ ]
}
}
}