diff --git a/Dockerfile b/Dockerfile
index cab1379..04a64c6 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -23,7 +23,7 @@ ADD transmission/ /etc/transmission/
ENV OPENVPN_USERNAME=**None** \
OPENVPN_PASSWORD=**None** \
- OPENVPN_PROVIDER=PIA \
+ OPENVPN_PROVIDER=**None** \
"TRANSMISSION_ALT_SPEED_DOWN=50" \
"TRANSMISSION_ALT_SPEED_ENABLED=false" \
"TRANSMISSION_ALT_SPEED_TIME_BEGIN=540" \
diff --git a/README.md b/README.md
index a295f64..9f04619 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,10 @@
# Transmission with WebUI and OpenVPN
-This Docker container lets you run Transmission with WebUI while connecting to either BTGUARD or PIA OpenVPN.
+Docker container which runs Transmission torrent client with WebUI while connecting to OpenVPN.
+It bundles certificates and configurations for the following VPN providers:
+* Private Internet Access
+* BTGuard
+* tigerVPN
+
When using PIA as provider it will update Transmission hourly with assigned open port. Please read the instructions below.
## Run container from Docker registry
@@ -16,12 +21,10 @@ $ docker run --privileged -d \
haugene/transmission-openvpn
```
-The `OPENVPN_PROVIDER` and `OPENVPN_CONFIG` are optional variables. If no provider is given, it will default to PIA.
-If no config is given, a default config will be selected for the provider you have chosen.
-The only mandatory environment variables are your OpenVPN username and password.
-You must set the environment variables `OPENVPN_USERNAME` and `OPENVPN_PASSWORD` to the credentials given by your OpenVPN provider.
+You must set the environment variables `OPENVPN_PROVIDER`, `OPENVPN_USERNAME` and `OPENVPN_PASSWORD` to provide basic connection details.
-Find the OpenVPN configurations avaliable by looking in the openvpn folder of the GitHub repository.
+The `OPENVPN_CONFIG` is an optional variable. If no config is given, a default config will be selected for the provider you have chosen.
+Find available OpenVPN configurations by looking in the openvpn folder of the GitHub repository.
As you can see, the container also expects a data volume to be mounted.
This is where Transmission will store your downloads, incomplete downloads and look for a watch directory for new .torrent files.
@@ -31,13 +34,13 @@ By default there will also be created a transmission-home folder under /data whe
### Required environment options
| Variable | Function | Example |
|----------|----------|-------|
+|`OPENVPN_PROVIDER` | Sets the OpenVPN provider to use. | `OPENVPN_PROVIDER=BTGUARD` or
`OPENVPN_PROVIDER=PIA` or
`OPENVPN_PROVIDER=TIGER`|
|`OPENVPN_USERNAME`|Your OpenVPN username |`OPENVPN_USERNAME=asdf`|
|`OPENVPN_PASSWORD`|Your OpenVPN password |`OPENVPN_PASSWORD=asdf`|
### Network configuration options
| Variable | Function | Example |
|----------|----------|-------|
-|`OPENVPN_PROVIDER` | Sets the OpenVPN provider to use. | `OPENVPN_PROVIDER=BTGUARD` or
`OPENVPN_PROVIDER=PIA`|
|`OPENVPN_CONFIG` | Sets the OpenVPN endpoint to connect to. | `OPENVPN_CONFIG=UK Southampton`|
|`RESOLV_OVERRIDE` | The value of this variable will be written to `/etc/resolv.conf`. | `RESOLV_OVERRIDE=nameserver 8.8.8.8\nnameserver 8.8.4.4\n`|
diff --git a/openvpn/start.sh b/openvpn/start.sh
index 2c0db45..ea12678 100755
--- a/openvpn/start.sh
+++ b/openvpn/start.sh
@@ -1,17 +1,19 @@
#!/bin/sh
-if [ "$OPENVPN_PROVIDER" = "BTGUARD" ]
-then
- echo "VPN PROVIDER: BTGUARD"
+if [ "$OPENVPN_PROVIDER" = "BTGUARD" ]; then
vpn_provider="btguard"
-else if [ "$OPENVPN_PROVIDER" = "PIA" ]
- echo "VPN PROVIDER: PIA"
+elif [ "$OPENVPN_PROVIDER" = "PIA" ]; then
vpn_provider="pia"
-else
- echo "VPN PROVIDER: TIGER"
+elif [ "$OPENVPN_PROVIDER" = "TIGER" ]; then
vpn_provider="tiger"
+else
+ echo "Could not find OpenVPN provider: $OPENVPN_PROVIDER"
+ echo "Please check your settings."
+ exit 1
fi
+echo "Using OpenVPN provider: $OPENVPN_PROVIDER"
+
if [ ! -z "$OPENVPN_CONFIG" ]
then
if [ -f /etc/openvpn/$vpn_provider/"${OPENVPN_CONFIG}".ovpn ]