Skip to content

Commit

Permalink
ensure cut port is integer and not string (hostname)
Browse files Browse the repository at this point in the history
  • Loading branch information
binhex committed Sep 29, 2020
1 parent 798297a commit b7ce500
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 @@ -202,7 +202,7 @@ if [[ $VPN_ENABLED == "yes" ]]; then
continue
fi
vpn_remote_port_cut=$(echo "${vpn_remote_line_item}" | cut -d " " -f2 || true)
vpn_remote_port_cut=$(echo "${vpn_remote_line_item}" | cut -d " " -f2 | grep -P -o '^[\d]{4,5}$' || true)
if [[ -z "${vpn_remote_port_cut}" ]]; then
echo "[warn] VPN configuration file ${VPN_CONFIG} remote port is missing or malformed, assuming port '1194'" | ts '%Y-%m-%d %H:%M:%.S'
Expand Down

0 comments on commit b7ce500

Please sign in to comment.