diff --git a/qbittorrent/rootfs/etc/cont-init.d/95-vpn-monitor.sh b/qbittorrent/rootfs/etc/cont-init.d/95-vpn-monitor.sh index d23e8d2a4..cc4d24920 100755 --- a/qbittorrent/rootfs/etc/cont-init.d/95-vpn-monitor.sh +++ b/qbittorrent/rootfs/etc/cont-init.d/95-vpn-monitor.sh @@ -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