Files
hassio-addons/qbittorrent/rootfs/etc/cont-init.d/95-vpn-monitor.sh
2025-11-24 14:11:57 +00:00

20 lines
451 B
Bash
Executable File

#!/usr/bin/with-contenv bashio
# 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
# No VPN enabled: remove monitoring service to avoid unnecessary restarts
rm -rf /etc/services.d/vpn-monitor
fi