Generate QR Code for wireguard configs
Added the functionality to generate QR codes from configurations stored in KeepassXC
This commit is contained in:
parent
a616830a7b
commit
df8685b6fe
20
bin/genwgQR
Executable file
20
bin/genwgQR
Executable file
@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
keepassdb="$HOME/Nextcloud/passwords/Passwords.kdbx"
|
||||||
|
|
||||||
|
type qrencode >/dev/null 2>&1 || { printf "qrencode is not installed\n" >&2; exit 1; }
|
||||||
|
type keepassxc-cli >/dev/null 2>&1 || { printf "KeepassXC is not installed\n" >&2; exit 1; }
|
||||||
|
|
||||||
|
printf "Enter password for $keepassdb: "
|
||||||
|
read -s password
|
||||||
|
printf "\n"
|
||||||
|
|
||||||
|
printf "Enter device name you want to generate the code for: "
|
||||||
|
read device
|
||||||
|
|
||||||
|
printf "Enter the tunnel name: "
|
||||||
|
read tunnel
|
||||||
|
|
||||||
|
|
||||||
|
echo "$password" | keepassxc-cli show -q --attributes Notes "$keepassdb" /Wireguard/"$device"/"$tunnel" | qrencode -t ansiutf8
|
||||||
|
|
||||||
|
unset password
|
@ -1,2 +1,3 @@
|
|||||||
packages:
|
packages:
|
||||||
weechat: { status: installed }
|
weechat: { status: installed }
|
||||||
|
grencode: { status: installed }
|
||||||
|
Loading…
Reference in New Issue
Block a user