mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-08-25 22:33:33 +02:00
qBittorrent upnp and firewall for VPN
This is implementation of the UPnP port opening for qBittorrent running on VPN. Implementation also includes simple firewall for incoming connections.
This commit is contained in:
15
qbittorrent/rootfs/etc/cont-init.d/96-vpn-upnp.sh
Normal file
15
qbittorrent/rootfs/etc/cont-init.d/96-vpn-upnp.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
set -euo pipefail
|
||||
|
||||
if ! bashio::config.true 'openvpn_enabled' && ! bashio::config.true 'wireguard_enabled'; then
|
||||
# No VPN enabled: remove UPnP service to avoid unnecessary restarts
|
||||
rm -rf /etc/services.d/vpn-upnp
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if ! bashio::config.true 'vpn_upnp_enabled'; then
|
||||
# UPnP not enabled: remove UPnP service to avoid unnecessary restarts
|
||||
rm -rf /etc/services.d/vpn-upnp
|
||||
exit 0
|
||||
fi
|
||||
Reference in New Issue
Block a user