From 17b4d620c10396ebb3a94817c330b1751f281121 Mon Sep 17 00:00:00 2001
From: raspy <raspy@stylis-studios.com>
Date: Thu, 8 Aug 2024 17:24:21 -0600
Subject: [PATCH] Avoid hardcoding credentials for pia forwarding on
 qbittorrent

---
 docker-compose.yml                   | 3 ++-
 pia-shared/portupdate-qbittorrent.sh | 2 --
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/docker-compose.yml b/docker-compose.yml
index 5db8492..2eba140 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -221,7 +221,6 @@ services:
       - traefik.http.middlewares.jellyseerr-rewrite.plugin.rewrite-body.rewrites[14].replacement="/jellyseerr/$1/".concat
       - traefik.http.middlewares.jellyseerr-rewrite.plugin.rewrite-body.rewrites[15].regex=url:"/([/a-zA-Z?=]*)"
       - traefik.http.middlewares.jellyseerr-rewrite.plugin.rewrite-body.rewrites[15].replacement=url:"/jellyseerr/$1"
-      
       - homepage.group=Media
       - homepage.name=JellySeerr
       - homepage.icon=jellyseerr.png
@@ -336,6 +335,8 @@ services:
       - LOC=${PIA_LOCATION}
       - USER=${PIA_USER}
       - PASS=${PIA_PASS}
+      - QBT_USER=${QBITTORRENT_USERNAME}
+      - QBT_PASS=${QBITTORRENT_PASSWORD}
       - LOCAL_NETWORK=${PIA_LOCAL_NETWORK}
       - PORT_FORWARDING=1
       - PORT_PERSIST=1
diff --git a/pia-shared/portupdate-qbittorrent.sh b/pia-shared/portupdate-qbittorrent.sh
index 3a0976f..cb2a814 100755
--- a/pia-shared/portupdate-qbittorrent.sh
+++ b/pia-shared/portupdate-qbittorrent.sh
@@ -1,8 +1,6 @@
 #!/bin/bash
 
 port="$1"
-QBT_USER=admin
-QBT_PASS=adminadmin
 QBT_PORT=8080
 
 echo "Setting qBittorrent port settings ($port)..."