Fix read
This commit is contained in:
parent
76f8a293a0
commit
d12f1aae1f
1 changed files with 2 additions and 2 deletions
|
|
@ -359,7 +359,7 @@ else
|
||||||
|
|
||||||
# Autodetect IP address and pre-fill for the user
|
# Autodetect IP address and pre-fill for the user
|
||||||
IP=$(ip addr | grep 'inet' | grep -v inet6 | grep -vE '127\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | grep -oE '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | head -1)
|
IP=$(ip addr | grep 'inet' | grep -v inet6 | grep -vE '127\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | grep -oE '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | head -1)
|
||||||
read -p "IP address: " -e -i $IP IP
|
read -rp "IP address: " -e -i $IP IP
|
||||||
# If $IP is a private IP address, the server must be behind NAT
|
# If $IP is a private IP address, the server must be behind NAT
|
||||||
if echo "$IP" | grep -qE '^(10\.|172\.1[6789]\.|172\.2[0-9]\.|172\.3[01]\.|192\.168)'; then
|
if echo "$IP" | grep -qE '^(10\.|172\.1[6789]\.|172\.2[0-9]\.|172\.3[01]\.|192\.168)'; then
|
||||||
echo ""
|
echo ""
|
||||||
|
|
@ -377,7 +377,7 @@ else
|
||||||
fi
|
fi
|
||||||
echo ""
|
echo ""
|
||||||
while [[ $IPV6 != "y" && $IPV6 != "n" ]]; do
|
while [[ $IPV6 != "y" && $IPV6 != "n" ]]; do
|
||||||
read -p "Do you want to enable IPv6 support? [y/n]: " -e IPV6
|
read -rp "Do you want to enable IPv6 support? [y/n]: " -e IPV6
|
||||||
done
|
done
|
||||||
echo ""
|
echo ""
|
||||||
echo "What port do you want for OpenVPN?"
|
echo "What port do you want for OpenVPN?"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue