require SERVER_WG_NIC shorter than 16 chars as well

This commit is contained in:
juliangaal 2020-11-22 19:04:04 +01:00
parent 22026dd8e6
commit 56a72844ef

View file

@ -79,7 +79,7 @@ function installQuestions() {
read -rp "Public interface: " -e -i "${SERVER_NIC}" SERVER_PUB_NIC
done
until [[ ${SERVER_WG_NIC} =~ ^[a-zA-Z0-9_]+$ ]]; do
until [[ ${SERVER_WG_NIC} =~ ^[a-zA-Z0-9_]+$ && ${#SERVER_WG_NIC} -lt 16 ]]; do
read -rp "WireGuard interface name: " -e -i wg0 SERVER_WG_NIC
done