Added QR code to dashboard

master
Keith Irwin 2022-11-07 12:43:21 -07:00
parent 980ab7cff2
commit 17b8720e91
Signed by: ki9
GPG Key ID: DF773B3F4A88DA86
1 changed files with 2 additions and 1 deletions

View File

@ -159,4 +159,5 @@ while IFS=$'\t' read -r server_hostname server_ipv4 server_ipv6 server_pubkey se
fi
done <"${SERVERS_FILE}"
wg_config="[Interface] # ${hostname}.${username}.${TLD}\nPrivateKey=${privkey:?}\nAddress=${address:?}\n${WG_DNS}\n${server_blocks:?}"
<<<"${wg_config}" "${LIB_DIR}/http_res" 202
qr_code="$(qrencode -t ansiutf8 <<<"${wg_config}")"
printf '%s\n\n%s\n' "${wg_config}" "${qr_code}" | "${LIB_DIR}/http_res" 202