Skip to content

Commit

Permalink
missing vpn remote env var
Browse files Browse the repository at this point in the history
  • Loading branch information
binhex committed Mar 13, 2018
1 parent 3888566 commit b628f22
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions build/root/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,13 @@ if [[ $VPN_ENABLED == "yes" ]]; then
fi
export VPN_REMOTE=$(echo "${vpn_remote_line}" | grep -P -o -m 1 '(?<=remote\s)[^\s]+' | sed -e 's~^[ \t]*~~;s~[ \t]*$~~')
if [[ ! -z "${VPN_REMOTE}" ]]; then
echo "[info] VPN_REMOTE defined as '${VPN_REMOTE}'" | ts '%Y-%m-%d %H:%M:%.S'
else
echo "[crit] VPN_REMOTE not found in ${VPN_CONFIG}, exiting..." | ts '%Y-%m-%d %H:%M:%.S' && exit 1
fi
export VPN_PORT=$(echo "${vpn_remote_line}" | grep -P -o -m 1 '(?<=\s)\d{2,5}(?=\s)?+' | sed -e 's~^[ \t]*~~;s~[ \t]*$~~')
if [[ ! -z "${VPN_PORT}" ]]; then
echo "[info] VPN_PORT defined as '${VPN_PORT}'" | ts '%Y-%m-%d %H:%M:%.S'
Expand Down

0 comments on commit b628f22

Please sign in to comment.