Update start.sh

This commit is contained in:
MarkusMcNugen 2018-02-12 00:20:14 -05:00 committed by GitHub
parent b3b057390f
commit db9188c3c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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}'"