mirror of
https://github.com/pcvolkmer/docker-wireguard-boringtun.git
synced 2025-04-19 13:26:50 +00:00
Add command to show client config and qr code
This commit is contained in:
parent
074ecc8857
commit
c24718fab3
@ -27,6 +27,15 @@ case "$1" in
|
||||
/scripts/rm-client.sh $2
|
||||
exit 0
|
||||
;;
|
||||
'show-client')
|
||||
if [ -z $2 ]; then
|
||||
echo "Usage: show-client <client id>"
|
||||
exit 1
|
||||
fi
|
||||
cd /etc/wireguard
|
||||
/scripts/show-client.sh $2
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo "Starting wg-quick on $DEVICE"
|
||||
touch "${WG_LOG_FILE}"
|
||||
|
11
scripts/show-client.sh
Executable file
11
scripts/show-client.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
cat "$DEVICE-client_$1.conf"
|
||||
|
||||
echo
|
||||
echo
|
||||
|
||||
# Create QR-codes for clients
|
||||
if [ ! -z "$(which qrencode 2>/dev/null)" ]; then
|
||||
qrencode -t utf8 < "$DEVICE-client_$1.conf"
|
||||
fi
|
Loading…
x
Reference in New Issue
Block a user