From c1097ca69c2c5b09c086f39f7ebb581c0bea081b Mon Sep 17 00:00:00 2001 From: Austin English Date: Fri, 27 Jan 2023 12:56:36 -0600 Subject: [PATCH] feat(scripts): allow generating a QR code from a filename Instead of returning an error, use the filename to generate the QR code. --- scripts/wireguard/qrcodeCONF.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/wireguard/qrcodeCONF.sh b/scripts/wireguard/qrcodeCONF.sh index e81f319..0365559 100755 --- a/scripts/wireguard/qrcodeCONF.sh +++ b/scripts/wireguard/qrcodeCONF.sh @@ -88,6 +88,13 @@ for CLIENT_NAME in "${CLIENTS_TO_SHOW[@]}"; do qrencode -t "${encoding}" < "${CLIENT_NAME}.conf" + echo "=====================================================================" + elif [[ -f "${CLIENT_NAME}" ]]; then + echo -e "::: Showing client \e[1m${CLIENT_NAME}\e[0m below" + echo "=====================================================================" + + qrencode -t "${encoding}" < "${CLIENT_NAME}" + echo "=====================================================================" else echo -e "::: \e[1m${CLIENT_NAME}\e[0m does not exist"