Skip to content

Commit

Permalink
Merge pull request #50 from timothynfarmer/master
Browse files Browse the repository at this point in the history
feat: Add VueTorrent to qBittorrent & clean up update-config.sh
  • Loading branch information
AdrienPoupa authored Jan 14, 2024
2 parents 8f141e5 + c1d516a commit d901b47
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 39 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ In Lidarr, set the Root folder to `/data/media/music`.
Then qBittorrent can be configured at Settings > Download Clients. Because all the networking for qBittorrent takes
place in the VPN container, the hostname for qBittorrent is the hostname of the VPN container, ie `vpn`, and the port is `8080`:

To use the VueTorrent WebUI just go to `qBittorrent`, `Options`, `Web UI`, `Use Alternative WebUI`, and enter `/vuetorrent`. Special thanks to gabe565 for the easy enablement with (https://github.com/gabe565/linuxserver-mod-vuetorrent).

## Prowlarr

The indexers are configured through Prowlarr. They synchronize automatically to Radarr and Sonarr.
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ services:
- PGID=${GROUP_ID}
- TZ=${TIMEZONE}
- WEBUI_PORT=8080
- DOCKER_MODS=ghcr.io/gabe565/linuxserver-mod-vuetorrent
volumes:
- ./qbittorrent:/config
- ${DOWNLOAD_ROOT}:/data/torrents
Expand Down
64 changes: 25 additions & 39 deletions update-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,30 @@

# See https://stackoverflow.com/a/44864004 for the sed GNU/BSD compatible hack

echo "Updating Radarr configuration..."
until [ -f ./radarr/config.xml ]
do
sleep 5
done
sed -i.bak "s/<UrlBase><\/UrlBase>/<UrlBase>\/radarr<\/UrlBase>/" ./radarr/config.xml && rm ./radarr/config.xml.bak
sed -i.bak 's/^RADARR_API_KEY=.*/RADARR_API_KEY='"$(sed -n 's/.*<ApiKey>\(.*\)<\/ApiKey>.*/\1/p' ./radarr/config.xml)"'/' .env && rm .env.bak

echo "Updating Sonarr configuration..."
until [ -f ./sonarr/config.xml ]
do
sleep 5
done
sed -i.bak "s/<UrlBase><\/UrlBase>/<UrlBase>\/sonarr<\/UrlBase>/" ./sonarr/config.xml && rm ./sonarr/config.xml.bak
sed -i.bak 's/^SONARR_API_KEY=.*/SONARR_API_KEY='"$(sed -n 's/.*<ApiKey>\(.*\)<\/ApiKey>.*/\1/p' ./sonarr/config.xml)"'/' .env && rm .env.bak

echo "Updating Lidarr configuration..."
until [ -f ./lidarr/config.xml ]
do
sleep 5
done
sed -i.bak "s/<UrlBase><\/UrlBase>/<UrlBase>\/lidarr<\/UrlBase>/" ./lidarr/config.xml && rm ./lidarr/config.xml.bak
sed -i.bak 's/^LIDARR_API_KEY=.*/LIDARR_API_KEY='"$(sed -n 's/.*<ApiKey>\(.*\)<\/ApiKey>.*/\1/p' ./lidarr/config.xml)"'/' .env && rm .env.bak

echo "Updating Prowlarr configuration..."
until [ -f ./prowlarr/config.xml ]
do
sleep 5
done
sed -i.bak "s/<UrlBase><\/UrlBase>/<UrlBase>\/prowlarr<\/UrlBase>/" ./prowlarr/config.xml && rm ./prowlarr/config.xml.bak
sed -i.bak 's/^PROWLARR_API_KEY=.*/PROWLARR_API_KEY='"$(sed -n 's/.*<ApiKey>\(.*\)<\/ApiKey>.*/\1/p' ./prowlarr/config.xml)"'/' .env && rm .env.bak
function update_config {
echo "Upadting ${1^} configuration..."
until [ -f ./$1/config.xml ]
do
sleep 5
done
sed -i.bak "s/<UrlBase><\/UrlBase>/<UrlBase>\/$1<\/UrlBase>/" ./$1/config.xml && rm ./$1/config.xml.bak
sed -i.bak 's/^'"${1^^}"'_API_KEY=.*/'"${1^^}"'_API_KEY='"$(sed -n 's/.*<ApiKey>\(.*\)<\/ApiKey>.*/\1/p' ./$1/config.xml)"'/' .env && rm .env.bak
echo "Update of ${1^} configuration complete."
echo "Restarting ${1^}..."
docker compose restart $1
}

echo "Updating Jellyfin configuration..."
until [ -f ./jellyfin/network.xml ]
do
sleep 5
for container in $(docker ps --format '{{.Names}}'); do
if [[ $container =~ ^(radarr|sonarr|lidarr|prowlarr)$ ]]; then
update_config $container
elif [[ $container =~ ^(jellyfin)$ ]]; then
echo "Upadting ${container^} configuration..."
until [ -f ./$container/network.xml ]; do
sleep 5
done
sed -i.bak "s/<BaseUrl \/>/<BaseUrl>\/$container<\/BaseUrl>/" ./$container/network.xml && rm ./$container/network.xml.bak
echo "Update of ${container^} configuration complete."
echo "Restarting ${container^}..."
docker compose restart $container
fi
done
sed -i.bak "s/<BaseUrl \/>/<BaseUrl>\/jellyfin<\/BaseUrl>/" ./jellyfin/network.xml && rm ./jellyfin/network.xml.bak

echo "Restarting containers..."
docker compose restart radarr sonarr prowlarr jellyfin

0 comments on commit d901b47

Please sign in to comment.