Add Pia Port forwarding option

This commit is contained in:
Greg Pringle
2021-05-15 06:40:49 -06:00
parent 2dbbbc6006
commit 00bce09f7f
9 changed files with 208 additions and 3 deletions

View File

@@ -77,9 +77,17 @@ sleep 1
qbpid=$(pgrep -o -x qbittorrent-nox)
echo "[info] qBittorrent PID: $qbpid" | ts '%Y-%m-%d %H:%M:%.S'
export PFWD=$(echo "${PIA_PORT_FORWARD}" | sed 's/"//g' )
if [ -e /proc/$qbpid ]; then
if [[ -e /config/qBittorrent/data/logs/qbittorrent.log ]]; then
chmod 775 /config/qBittorrent/data/logs/qbittorrent.log
if [[ $PFWD == "yes" ]]; then
echo "[info] PIA Port forwarding configured, calling pia_port_forwarding.sh"
/bin/bash /etc/openvpn/pia_port_forwarding.sh
else
echo "[info] PIA Port forwarding not enabled"
fi
fi
sleep infinity
else