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