From 11f7ae01a3e9a092fc778337b05a0a1f9109386e Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Fri, 6 May 2022 18:23:34 +0200 Subject: [PATCH] Update run --- qbittorrent/rootfs/etc/services.d/nginx/run | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/qbittorrent/rootfs/etc/services.d/nginx/run b/qbittorrent/rootfs/etc/services.d/nginx/run index 3b3a12a28..c123860c9 100644 --- a/qbittorrent/rootfs/etc/services.d/nginx/run +++ b/qbittorrent/rootfs/etc/services.d/nginx/run @@ -14,6 +14,15 @@ if [ -f /currentip ]; then fi fi +if [ -f /currentip2 ]; then + if [[ "$(curl -s ipecho.net/plain --interface tun0)" = "$(cat /currentip2)" ]]; then + bashio::log.fatal "VPN is not properly configured. Your ip is exposed. Please fix this, or do not use the vpn alt mode" + bashio::exit.nok + else + bashio::log.info "VPN is up and running with ip $(curl -s ipecho.net/plain --interface tun0)" + fi +fi + bashio::log.info "Starting NGinx..." exec nginx