From 99203ee75e2d827dbcc0f3f7ab867bc8d837bc93 Mon Sep 17 00:00:00 2001 From: smolgrrr Date: Wed, 5 Jun 2024 21:49:02 +1000 Subject: [PATCH] Update qBittorrent to v4.6.5 (#893) Co-authored-by: nmfretz --- qbittorrent/docker-compose.yml | 5 ++-- qbittorrent/hooks/post-start | 47 ++++++++++++++++++++++++++++++++++ qbittorrent/umbrel-app.yml | 20 ++++++++++++--- 3 files changed, 66 insertions(+), 6 deletions(-) create mode 100755 qbittorrent/hooks/post-start diff --git a/qbittorrent/docker-compose.yml b/qbittorrent/docker-compose.yml index e4a5635d3..8ebe4c763 100644 --- a/qbittorrent/docker-compose.yml +++ b/qbittorrent/docker-compose.yml @@ -8,12 +8,13 @@ services: PROXY_AUTH_ADD: "false" server: - image: hotio/qbittorrent:release-4.6.0@sha256:78ac9dfad4e1bbb7233e11e09781c929e692d92d5de8f499c0f4477eee266622 + image: hotio/qbittorrent:release-4.6.5@sha256:6a665f19c2d123dd9063ac61345cbc377d9238e66bb3964a6b8ec29a21b3416d environment: - PUID=1000 - PGID=1000 # - UMASK=002 volumes: - ${APP_DATA_DIR}/data/config:/config - - ${UMBREL_ROOT}/data/storage/downloads:/downloads + # /app/qBittorrent/downloads is the default path set in qBittorrent + - ${UMBREL_ROOT}/data/storage/downloads:/app/qBittorrent/downloads restart: on-failure \ No newline at end of file diff --git a/qbittorrent/hooks/post-start b/qbittorrent/hooks/post-start new file mode 100755 index 000000000..705304398 --- /dev/null +++ b/qbittorrent/hooks/post-start @@ -0,0 +1,47 @@ +#!/usr/bin/env bash +set -euo pipefail + +# As of v4.6.1, qBittorrent no longer supports a default password and instead prints a temporary password to the logs, which is not ideal for users. +# Users are meant to start qBittorrent, copy the temporary password from the container logs, log in with the temporary password, and then set a new password from the UI. +# This script will set the default password to the legacy 'adminadmin' password if the password is not already set. If a user has already set a password, this script will not overwrite it. +# The app description in the Umbrel app store encourages users to change the default password. + +APP_DATA_DIR="$(readlink -f $(dirname "${BASH_SOURCE[0]}")/..)" +QBITTORRENT_CONF_FILE="${APP_DATA_DIR}/data/config/config/qBittorrent.conf" + +echo "Waiting for file (${QBITTORRENT_CONF_FILE}) to exist..." + +# Wait up to 30 seconds... +for attempt in $(seq 1 300); do + if [[ -f "${QBITTORRENT_CONF_FILE}" ]]; then + echo "qBittorrent.conf file exists" + break + fi + sleep 0.1 +done + +if [[ ! -f "${QBITTORRENT_CONF_FILE}" ]]; then + echo "qBittorrent.conf was never created. Something is likely wrong with the qBittorrent app." + exit +fi + +# If a line with `WebUI\Password_PBKDF2` does not exist yet in the qBittorrent.conf then a custom password hasn't been set yet and we write out `adminadmin` as the default password. +# This line is expected to be under the [Preferences] section. + +if ! grep --quiet '^WebUI\\Password_PBKDF2' "${QBITTORRENT_CONF_FILE}"; then + echo "Writing default password adminadmin to qBittorrent.conf" + + # Add the WebUI\Password_PBKDF2 line directly to the qBittorrent.conf file + # This salted hash is for the password 'adminadmin' + awk '/^\[Preferences\]/ { print; print "WebUI\\Password_PBKDF2=\"@ByteArray(gTzqQHUv3A1X43tLaAhaJQ==:ZBCIBA4honNZ7H66xdEoHpqBC/Vvwj17ZCjQKARSK78ScJWDMdWSfxezHG536UekAL/zpRn571MXCfhtdqiArA==)\""; next }1' "${QBITTORRENT_CONF_FILE}" > "${QBITTORRENT_CONF_FILE}.tmp" + + # Backup the original configuration file + cp "${QBITTORRENT_CONF_FILE}" "${QBITTORRENT_CONF_FILE}.bak" + + # Replace the original configuration file with the updated one + mv "${QBITTORRENT_CONF_FILE}.tmp" "${QBITTORRENT_CONF_FILE}" + + echo "Password has been set to 'adminadmin'." +else + echo "'WebUI\\Password_PBKDF2' already exists in qBittorrent.conf. No changes made." +fi \ No newline at end of file diff --git a/qbittorrent/umbrel-app.yml b/qbittorrent/umbrel-app.yml index 9c001e175..f7ffe16d0 100644 --- a/qbittorrent/umbrel-app.yml +++ b/qbittorrent/umbrel-app.yml @@ -1,20 +1,32 @@ -manifestVersion: 1 +manifestVersion: 1.1 id: qbittorrent category: networking name: qBittorrent -version: "4.6.0" +version: "4.6.5" tagline: Free and reliable P2P Bittorrent client description: >- qBittorrent is an open-source software alternative to µTorrent. It's designed to meet the needs of most users while using as little CPU and memory as possible. - This app comes bundled with VueTorrent, a sleek user interface that provides an alternative to qBittorrent's default interface. + 🛠️ SET-UP INSTRUCTIONS + + - qBittorrent on umbrelOS is configured to work without any additional configuration. Please make sure that you do not change the default download path in the app settings. It should remain set to "/app/qBittorrent/downloads" to ensure that your downloads show up in your main Umbrel downloads folder. + + - This app comes bundled with VueTorrent, a sleek user interface that provides an alternative to qBittorrent's default interface. To enable VueTorrent, simply navigate to tools --> options --> Web UI and select "Use alternative Web UI". + + - It is recommended to change the default password for the app after installation. ⚠️ qBittorrent downloads torrents over the Clearnet, not Tor. releaseNotes: >- - This release updates qBittorrent from version 4.5.2 to 4.6.0. Read the full release notes at https://www.qbittorrent.org/news#sun-oct-22th-2023---qbittorrent-v4.6.0-release + This release updates qBittorrent from version 4.6.0 to 4.6.5. + + + ⚠️ After updating, please ensure that your downloads path in the app is set to the default "/app/qBittorrent/downloads" path. This will make it so that your downloads show up in your main Umbrel downloads folder. + + + Read the full release notes at https://www.qbittorrent.org/news#sun-may-26th-2024---qbittorrent-v4.6.5-release developer: qBittorrent website: https://qbittorrent.org/ dependencies: []