Fix the network interface variable

Fix for https://github.com/Angristan/OpenVPN-install/pull/83#issuecomment-343758329
This commit is contained in:
Angristan 2017-11-12 19:54:44 +01:00 committed by GitHub
parent dcec3f12a4
commit aca3b4a019
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -87,7 +87,7 @@ if [[ "$IP" = "" ]]; then
IP=$(wget -qO- ipv4.icanhazip.com)
fi
# Get Internet network interface with default route
NIC=$(ip -4 route ls | grep default | grep -Po '(?<=dev )(\S+)')
NIC=$(ip -4 route ls | grep default | grep -Po '(?<=dev )(\S+)' | head -1)
if [[ -e /etc/openvpn/server.conf ]]; then
while :