mirror of
https://github.com/MarkusMcNugen/docker-qBittorrentvpn
synced 2024-11-23 02:54:57 +00:00
Update start.sh
This commit is contained in:
parent
1601f402e6
commit
cf18efc081
@ -114,5 +114,19 @@ elif [[ $VPN_ENABLED == "no" ]]; then
|
|||||||
echo "[warn] !!IMPORTANT!! You have set the VPN to disabled, you will NOT be secure!" | ts '%Y-%m-%d %H:%M:%.S'
|
echo "[warn] !!IMPORTANT!! You have set the VPN to disabled, you will NOT be secure!" | ts '%Y-%m-%d %H:%M:%.S'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# split comma seperated string into list from NAME_SERVERS env variable
|
||||||
|
IFS=',' read -ra name_server_list <<< "${NAME_SERVERS}"
|
||||||
|
|
||||||
|
# process name servers in the list
|
||||||
|
for name_server_item in "${name_server_list[@]}"; do
|
||||||
|
|
||||||
|
# strip whitespace from start and end of lan_network_item
|
||||||
|
name_server_item=$(echo "${name_server_item}" | sed -e 's~^[ \t]*~~;s~[ \t]*$~~')
|
||||||
|
|
||||||
|
echo "[info] Adding ${name_server_item} to resolv.conf"
|
||||||
|
echo "nameserver ${name_server_item}" >> /etc/resolv.conf
|
||||||
|
|
||||||
|
done
|
||||||
|
|
||||||
echo "[info] Starting OpenVPN..."
|
echo "[info] Starting OpenVPN..."
|
||||||
exec openvpn --config "$VPN_CONFIG"
|
exec openvpn --config "$VPN_CONFIG"
|
||||||
|
Loading…
Reference in New Issue
Block a user