Skip to content

Commit

Permalink
Fix auto-install
Browse files Browse the repository at this point in the history
  • Loading branch information
angristan committed Feb 25, 2019
1 parent 7ba776c commit 52d6728
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions openvpn-install.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -572,11 +572,11 @@ function installOpenVPN () {
# Behind NAT, we'll default to the publicly reachable IPv4.
PUBLIC_IPV4=$(curl ifconfig.co)
ENDPOINT=${ENDPOINT:-PUBLIC_IPV4}
else
# Run setup questions first
installQuestions
fi

# Run setup questions first, and set other variales if auto-install
installQuestions

# Get the "public" interface from the default route
NIC=$(ip -4 route ls | grep default | grep -Po '(?<=dev )(\S+)' | head -1)

Expand Down Expand Up @@ -1039,6 +1039,8 @@ function newClient () {
echo ""
echo "Client $CLIENT added, the configuration file is available at $homeDir/$CLIENT.ovpn."
echo "Download the .ovpn file and import it in your OpenVPN client."

exit 0
}

function revokeClient () {
Expand Down

0 comments on commit 52d6728

Please sign in to comment.