mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-24 01:31:51 +02:00
Update run
This commit is contained in:
@@ -79,6 +79,11 @@ _vpn_monitor_public_ip() {
|
|||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ ! -s "${current_ip_file}" ]]; then
|
||||||
|
bashio::log.warning "${vpn_label}: public ip could not be reached; VPN leak monitoring disabled."
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
if ! bashio::fs.file_exists "${current_ip_file}"; then
|
if ! bashio::fs.file_exists "${current_ip_file}"; then
|
||||||
bashio::log.warning "${vpn_label}: baseline IP file ${current_ip_file} not found; VPN leak monitoring disabled."
|
bashio::log.warning "${vpn_label}: baseline IP file ${current_ip_file} not found; VPN leak monitoring disabled."
|
||||||
return 0
|
return 0
|
||||||
@@ -231,11 +236,7 @@ echo "$(_fetch_public_ip || true)" > /currentip
|
|||||||
|
|
||||||
if bashio::config.true 'openvpn_enabled'; then
|
if bashio::config.true 'openvpn_enabled'; then
|
||||||
# Start Leak Monitor
|
# Start Leak Monitor
|
||||||
if [[ ! -s /currentip ]]; then
|
_vpn_monitor_public_ip "OpenVPN" &
|
||||||
bashio::log.warning "Could not fetch public ip, the vpn leakage service will not run"
|
|
||||||
else
|
|
||||||
_vpn_monitor_public_ip "OpenVPN" &
|
|
||||||
fi
|
|
||||||
|
|
||||||
exec /usr/sbin/openvpn \
|
exec /usr/sbin/openvpn \
|
||||||
--config /config/openvpn/config.ovpn \
|
--config /config/openvpn/config.ovpn \
|
||||||
@@ -255,11 +256,7 @@ elif bashio::config.true 'wireguard_enabled'; then
|
|||||||
_setup_wireguard
|
_setup_wireguard
|
||||||
|
|
||||||
# Start Leak Monitor
|
# Start Leak Monitor
|
||||||
if [[ ! -s /currentip ]]; then
|
_vpn_monitor_public_ip "WireGuard" &
|
||||||
bashio::log.warning "Could not fetch public ip, the vpn leakage service will not run"
|
|
||||||
else
|
|
||||||
_vpn_monitor_public_ip "WireGuard" &
|
|
||||||
fi
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user