diff --git a/qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh b/qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh index c1d4a2c7c..91fcc6604 100644 --- a/qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh +++ b/qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh @@ -12,6 +12,9 @@ if bashio::config.true 'openvpn_enabled'; then bashio::log.info "Configuring openvpn" + # Get current ip + curl -s ipecho.net/plain > /currentip + ##################### # CONFIGURE OPENVPN # ##################### @@ -56,9 +59,6 @@ if bashio::config.true 'openvpn_enabled'; then sed -i '/route-nopull/d' /etc/openvpn/config.ovpn fi - # Get current ip - echo "$(curl -s ipecho.net/plain)" > /currentip - # Exit exit 0 fi @@ -74,9 +74,6 @@ if bashio::config.true 'openvpn_enabled'; then LINE=$((LINE + 1)) SESSION=$(sed -n '/BitTorrent/=' "$QBT_CONFIG_FILE") - # Get current ip - echo "$(curl -s ipecho.net/plain)" > /currentip2 - # If qBittorrent.conf exists if [ -f "$QBT_CONFIG_FILE" ]; then # Remove previous line and bind tun0