mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-19 11:20:15 +00:00
Fixes #100
This commit is contained in:
parent
4bde296a14
commit
bee837790a
1 changed files with 10 additions and 0 deletions
|
@ -842,6 +842,16 @@ confNetwork() {
|
||||||
|
|
||||||
confOVPN() {
|
confOVPN() {
|
||||||
IPv4pub=$(dig +short myip.opendns.com @resolver1.opendns.com)
|
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/pivpnUSR /etc/pivpn/INSTALL_USER
|
||||||
$SUDO cp /tmp/DET_PLATFORM /etc/pivpn/DET_PLATFORM
|
$SUDO cp /tmp/DET_PLATFORM /etc/pivpn/DET_PLATFORM
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue