From aca3b4a019c3545331e2f8e39af65ac730501d6a Mon Sep 17 00:00:00 2001 From: Angristan Date: Sun, 12 Nov 2017 19:54:44 +0100 Subject: [PATCH] Fix the network interface variable Fix for https://github.com/Angristan/OpenVPN-install/pull/83#issuecomment-343758329 --- openvpn-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openvpn-install.sh b/openvpn-install.sh index e3b8f8e..2f0dfa4 100755 --- a/openvpn-install.sh +++ b/openvpn-install.sh @@ -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 :