mirror of
https://github.com/angristan/openvpn-install.git
synced 2025-05-09 18:28:23 +02:00
Fix IP Detection conditions
This commit is contained in:
parent
de65f02994
commit
5fd223790d
@ -283,9 +283,12 @@ function installQuestions() {
|
|||||||
echo "It seems this server is behind NAT. What is its public IPv4 address or hostname?"
|
echo "It seems this server is behind NAT. What is its public IPv4 address or hostname?"
|
||||||
echo "We need it for the clients to connect to the server."
|
echo "We need it for the clients to connect to the server."
|
||||||
|
|
||||||
|
if [[ -z $ENDPOINT ]]; then
|
||||||
|
DEFAULT_ENDPOINT=$(resolvePublicIP)
|
||||||
|
fi
|
||||||
|
|
||||||
until [[ $ENDPOINT != "" ]]; do
|
until [[ $ENDPOINT != "" ]]; do
|
||||||
PUBLIC_IP=$(resolvePublicIP)
|
read -rp "Public IPv4 address or hostname: " -e -i "$DEFAULT_ENDPOINT" ENDPOINT
|
||||||
read -rp "Public IPv4 address or hostname: " -e -i "$PUBLIC_IP" ENDPOINT
|
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -664,9 +667,9 @@ function installOpenVPN() {
|
|||||||
PASS=${PASS:-1}
|
PASS=${PASS:-1}
|
||||||
CONTINUE=${CONTINUE:-y}
|
CONTINUE=${CONTINUE:-y}
|
||||||
|
|
||||||
until [[ $ENDPOINT != "" ]]; do
|
if [[ -z $ENDPOINT ]]; then
|
||||||
ENDPOINT=$(resolvePublicIP)
|
ENDPOINT=$(resolvePublicIP)
|
||||||
done
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Run setup questions first, and set other variables if auto-install
|
# Run setup questions first, and set other variables if auto-install
|
||||||
|
Loading…
x
Reference in New Issue
Block a user