mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 02:11:01 +01:00
Update 95-vpn-monitor.sh
This commit is contained in:
@@ -2,18 +2,7 @@
|
|||||||
# shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
vpn_openvpn=false
|
if ! bashio::config.true 'openvpn_enabled' && ! bashio::config.true 'wireguard_enabled'; then
|
||||||
vpn_wireguard=false
|
|
||||||
|
|
||||||
if bashio::config.true 'openvpn_enabled'; then
|
|
||||||
vpn_openvpn=true
|
|
||||||
fi
|
|
||||||
|
|
||||||
if bashio::config.true 'wireguard_enabled'; then
|
|
||||||
vpn_wireguard=true
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "${vpn_openvpn}" != true && "${vpn_wireguard}" != true ]]; then
|
|
||||||
# No VPN enabled: remove monitoring service to avoid unnecessary restarts
|
# No VPN enabled: remove monitoring service to avoid unnecessary restarts
|
||||||
rm -rf /etc/services.d/vpn-monitor
|
rm -rf /etc/services.d/vpn-monitor
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user