Skip to content

Commit

Permalink
add in code to fix up tcp-client name in config
Browse files Browse the repository at this point in the history
  • Loading branch information
binhex committed Jul 10, 2017
1 parent ba315da commit f509b2a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion run/root/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,11 @@ else

# write env vars to ovpn file (used as phased approach to parse ovpn file)
if [[ ! -z "${VPN_PROTOCOL}" ]]; then
sed -i -r "s~^;?proto\s.*~proto ${VPN_PROTOCOL}~g" "${VPN_CONFIG}"
if [[ "${VPN_PROTOCOL}" == "tcp" ]]; then
sed -i -r "s~^;?proto\s.*~proto tcp-client~g" "${VPN_CONFIG}"
else
sed -i -r "s~^;?proto\s.*~proto udp~g" "${VPN_CONFIG}"
fi
fi

if [[ ! -z "${VPN_REMOTE}" && ! -z "${VPN_PORT}" ]]; then
Expand Down

0 comments on commit f509b2a

Please sign in to comment.