Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions bin/entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ ENABLE_NAT=${ENABLE_NAT:-1}
NAT_SOURCE=${NAT_SOURCE:-10.8.0.0/24}
NAT_DEVICE=${NAT_DEVICE:-eth0}

DEBUG=${DEBUG:-0}

# Create device for tun interfaces
mkdir -p /dev/net
if [ ! -c /dev/net/tun ]; then
Expand All @@ -24,4 +26,9 @@ if [[ -e ${USER_STARTUP_SCRIPT} ]]; then
${USER_STARTUP_SCRIPT}
fi

# Redirect output to /dev/null unless in debug mode
if [[ $DEBUG = 0 ]]; then
exec &>/dev/null
fi

exec openvpn --config ${CONFIG_DIR}/openvpn.conf --cd ${CONFIG_DIR} $@