From db9188c3c59def436b7c41b6e286d52b0e31b175 Mon Sep 17 00:00:00 2001 From: MarkusMcNugen Date: Mon, 12 Feb 2018 00:20:14 -0500 Subject: [PATCH] Update start.sh --- openvpn/start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openvpn/start.sh b/openvpn/start.sh index f514ebe..3e13f37 100755 --- a/openvpn/start.sh +++ b/openvpn/start.sh @@ -82,7 +82,7 @@ if [[ $VPN_ENABLED == "yes" ]]; then export VPN_PROTOCOL="tcp" fi - VPN_DEVICE_TYPE=$(cat "${VPN_CONFIG}" | grep -P -o -m 1 '(?<=^dev\s)[^\r\n\d]+' | sed -e 's~^[ \t]*~~;s~[ \t]*$~~') + VPN_DEVICE_TYPE=$(cat "${VPN_CONFIG}" | awk '/dev / {print $2; exit}' | sed -e 's~^[ \t]*~~;s~[ \t]*$~~') if [[ ! -z "${VPN_DEVICE_TYPE}" ]]; then export VPN_DEVICE_TYPE="${VPN_DEVICE_TYPE}0" echo "$(date) [info] VPN_DEVICE_TYPE defined as '${VPN_DEVICE_TYPE}'"