mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-18 10:50:16 +00:00
feat(scripts): allow generating a QR code from a filename
Instead of returning an error, use the filename to generate the QR code.
This commit is contained in:
parent
f1d0d974b2
commit
c1097ca69c
1 changed files with 7 additions and 0 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue