From 67b56c7cd62c6fac36decfb1528b6e0b212c5cca Mon Sep 17 00:00:00 2001 From: binhex Date: Thu, 22 Mar 2018 13:26:18 +0000 Subject: [PATCH] fix regex for comment removal --- build/root/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/root/install.sh b/build/root/install.sh index 6df562b..8b818e9 100644 --- a/build/root/install.sh +++ b/build/root/install.sh @@ -134,7 +134,7 @@ if [[ $VPN_ENABLED == "yes" ]]; then sed -i '/^remote\s.*/d' "${VPN_CONFIG}" # if remote line contains comments then remove - vpn_remote_line=$(echo "${vpn_remote_line}" | sed -i '/\s?\#\s?.*$/d') + vpn_remote_line=$(echo "${vpn_remote_line}" | sed -r 's~\s?+#.*$~~g') # if remote line contains old format 'tcp' then replace with newer 'tcp-client' format vpn_remote_line=$(echo "${vpn_remote_line}" | sed "s/tcp$/tcp-client/g")