mirror of
https://github.com/haugene/docker-transmission-openvpn.git
synced 2025-08-12 01:07:11 +02:00
dragfly: Added tool to select best server for the country
Update start.sh as proposed by dragfly
This commit is contained in:
parent
19ce1ed6e5
commit
785b46b443
@ -13,6 +13,15 @@ fi
|
||||
|
||||
echo "Using OpenVPN provider: ${OPENVPN_PROVIDER}"
|
||||
|
||||
if [[ "$OPENVPN_PROVIDER" = "NORDVPN" ]]
|
||||
then
|
||||
if [[ -z "$OPENVPN_CONFIG" ]]
|
||||
then
|
||||
export OPENVPN_CONFIG=$(curl -s 'https://nordvpn.com/wp-admin/admin-ajax.php?action=servers_recommendations' | jq -r '.[0].hostname').udp
|
||||
echo "Setting best server ${OPENVPN_CONFIG}"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n "${OPENVPN_CONFIG-}" ]]; then
|
||||
readarray -t OPENVPN_CONFIG_ARRAY <<< "${OPENVPN_CONFIG//,/$'\n'}"
|
||||
## Trim leading and trailing spaces from all entries. Inefficient as all heck, but works like a champ.
|
||||
|
Loading…
Reference in New Issue
Block a user