Verify vpn is working

https://github.com/alexbelgium/hassio-addons/issues/305
This commit is contained in:
Alexandre
2022-05-04 17:59:46 +02:00
committed by GitHub
parent 02b4f2a503
commit cbe4da7fde

View File

@@ -5,6 +5,13 @@
# Wait for transmission to become available
bashio::net.wait_for 8080 localhost 900
if [ -f /currentip ]; then
if [[ "$(curl ipecho.net/plain)" = "$(cat /currentip)" ]]; 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
fi
fi
bashio::log.info "Starting NGinx..."
exec nginx