mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-18 19:00:15 +00:00
Update install.sh
This commit is contained in:
parent
30f8508055
commit
375faa6398
1 changed files with 5 additions and 7 deletions
|
@ -949,13 +949,11 @@ confNetwork() {
|
||||||
}
|
}
|
||||||
|
|
||||||
confOVPN() {
|
confOVPN() {
|
||||||
IPv4pub=$(dig +short myip.opendns.com @208.67.222.222)
|
if ! IPv4pub=$(dig +short myip.opendns.com @208.67.222.222) || ! valid_ip "$IPv4pub"; then
|
||||||
if [ $? -ne 0 ] || [ -z "$IPv4pub" ]; then
|
echo "dig failed, now trying to curl checkip.amazonaws.com"
|
||||||
echo "dig failed, now trying to curl whatismyip.akamai.com"
|
if ! IPv4pub=$(curl -s https://checkip.amazonaws.com) || ! valid_ip "$IPv4pub"; then
|
||||||
if ! IPv4pub=$(curl -s http://whatismyip.akamai.com)
|
echo "checkip.amazonaws.com failed, please check your internet connection/DNS"
|
||||||
then
|
exit 1
|
||||||
echo "whatismyip.akamai.com failed, please check your internet connection/DNS"
|
|
||||||
exit $?
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
$SUDO cp /tmp/pivpnUSR /etc/pivpn/INSTALL_USER
|
$SUDO cp /tmp/pivpnUSR /etc/pivpn/INSTALL_USER
|
||||||
|
|
Loading…
Reference in a new issue