Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Commit

Permalink
openvpn.sh fix behavior on config change when daemon is running
Browse files Browse the repository at this point in the history
  • Loading branch information
David Personette committed May 16, 2015
1 parent 9f881c5 commit 0336f98
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion openvpn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ shift $(( OPTIND - 1 ))
[[ "${TIMEZONE:-""}" ]] && timezone "$TIMEZONE"
[[ "${VPN:-""}" ]] && eval vpn $(sed 's/^\|$/"/g; s/;/" "/g' <<< $VPN)

if [[ $# -ge 1 && -x $(which $1 2>&-) ]]; then
if ps -ef | grep -q openvpn; then
echo "Service already running, please restart container to apply changes"
elif [[ $# -ge 1 && -x $(which $1 2>&-) ]]; then
exec "$@"
elif [[ $# -ge 1 ]]; then
echo "ERROR: command not found: $1"
Expand Down

0 comments on commit 0336f98

Please sign in to comment.