diff --git a/scripts/entrypoint.sh b/scripts/entrypoint.sh index 9a0e966..2211f6b 100755 --- a/scripts/entrypoint.sh +++ b/scripts/entrypoint.sh @@ -27,6 +27,15 @@ case "$1" in /scripts/rm-client.sh $2 exit 0 ;; + 'show-client') + if [ -z $2 ]; then + echo "Usage: show-client " + exit 1 + fi + cd /etc/wireguard + /scripts/show-client.sh $2 + exit 0 + ;; *) echo "Starting wg-quick on $DEVICE" touch "${WG_LOG_FILE}" diff --git a/scripts/show-client.sh b/scripts/show-client.sh new file mode 100755 index 0000000..4764cac --- /dev/null +++ b/scripts/show-client.sh @@ -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 \ No newline at end of file