Merge pull request #697 from wilmardo/openvpn-scripts

Adds pre-start for openvpn
This commit is contained in:
Kristian Haugene
2019-02-21 13:13:41 +01:00
committed by GitHub
2 changed files with 9 additions and 0 deletions

View File

@@ -246,6 +246,7 @@ Once /scripts is mounted you'll need to write your custom code in the following
| Script | Function |
|----------|----------|
|/scripts/openvpn-pre-start.sh | This shell script will be executed before openvpn start |
|/scripts/transmission-pre-start.sh | This shell script will be executed before transmission start |
|/scripts/transmission-post-start.sh | This shell script will be executed after transmission start |
|/scripts/transmission-pre-stop.sh | This shell script will be executed before transmission stop |

View File

@@ -13,6 +13,14 @@ fi
echo "Using OpenVPN provider: ${OPENVPN_PROVIDER}"
# If openvpn-pre-start.sh exists, run it
if [ -x /scripts/openvpn-pre-start.sh ]
then
echo "Executing /scripts/openvpn-pre-start.sh"
/scripts/openvpn-pre-start.sh "$@"
echo "/scripts/openvpn-pre-start.sh returned $?"
fi
if [[ "$OPENVPN_PROVIDER" = "NORDVPN" ]]
then
if [[ -z "$OPENVPN_CONFIG" ]]