From bee837790ad6f78e397cedbefc47c21b57566491 Mon Sep 17 00:00:00 2001 From: redfast00 Date: Sun, 9 Oct 2016 18:27:45 +0200 Subject: [PATCH] Fixes #100 --- auto_install/install.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/auto_install/install.sh b/auto_install/install.sh index 32f30da..696b185 100755 --- a/auto_install/install.sh +++ b/auto_install/install.sh @@ -842,6 +842,16 @@ confNetwork() { confOVPN() { IPv4pub=$(dig +short myip.opendns.com @resolver1.opendns.com) + if [ $? -ne 0 ] + then + echo "dig failed, now trying to curl eth0.me" + IPv4pub=$(curl eth0.me) + if [ $? -ne 0 ] + then + echo "eth0.me failed, please check your internet connection/DNS" + exit $? + fi + fi $SUDO cp /tmp/pivpnUSR /etc/pivpn/INSTALL_USER $SUDO cp /tmp/DET_PLATFORM /etc/pivpn/DET_PLATFORM