set vpn provider as required param

This commit is contained in:
Kristian Haugene
2015-08-18 22:23:04 +02:00
parent 203219a713
commit 8d8a2c3c8c
3 changed files with 20 additions and 15 deletions

View File

@@ -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 ]