Skip to content

Commit

Permalink
fix regex for comment removal
Browse files Browse the repository at this point in the history
  • Loading branch information
binhex committed Mar 22, 2018
1 parent c0c539c commit 67b56c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build/root/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 67b56c7

Please sign in to comment.