fix silent fail due to set -x for no remote line

pull/27/head 4.2.0-1-01
binhex 4 years ago
parent 10f79aac2f
commit 11996b9843

@ -167,7 +167,7 @@ if [[ $VPN_ENABLED == "yes" ]]; then
/usr/local/bin/dos2unix.sh "${VPN_CONFIG}"
# get first matching 'remote' line in ovpn
vpn_remote_line=$(cat "${VPN_CONFIG}" | grep -P -o -m 1 '^(\s+)?remote\s.*')
vpn_remote_line=$(cat "${VPN_CONFIG}" | grep -P -o -m 1 '^(\s+)?remote\s.*' || true)
if [ -n "${vpn_remote_line}" ]; then

Loading…
Cancel
Save