From 5f0698808347b3877f14d00ab6d880594442ca7f Mon Sep 17 00:00:00 2001 From: thespad Date: Wed, 17 Jul 2024 11:16:02 +0100 Subject: [PATCH] Restore qbittorrent-cli --- Dockerfile | 12 ++++++++++++ Dockerfile.aarch64 | 12 ++++++++++++ readme-vars.yml | 1 + root/usr/bin/qbt | 15 +++++++++++++++ 4 files changed, 40 insertions(+) create mode 100755 root/usr/bin/qbt diff --git a/Dockerfile b/Dockerfile index 57b8270..4bf5843 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,6 +31,18 @@ RUN \ fi && \ apk add -U --upgrade --no-cache \ qbittorrent-nox==${QBITTORRENT_VERSION} && \ + echo "***** install qbitorrent-cli ****" && \ + mkdir /qbt && \ + if [ -z ${QBT_CLI_VERSION+x} ]; then \ + QBT_CLI_VERSION=$(curl -sL "https://api.github.com/repos/fedarovich/qbittorrent-cli/releases/latest" \ + | jq -r '. | .tag_name'); \ + fi && \ + curl -o \ + /tmp/qbt.tar.gz -L \ + "https://github.com/fedarovich/qbittorrent-cli/releases/download/${QBT_CLI_VERSION}/qbt-linux-alpine-x64-${QBT_CLI_VERSION#v}.tar.gz" && \ + tar xf \ + /tmp/qbt.tar.gz -C \ + /qbt && \ printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \ echo "**** cleanup ****" && \ rm -rf \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index e032a44..0da79dc 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -31,6 +31,18 @@ RUN \ fi && \ apk add -U --upgrade --no-cache \ qbittorrent-nox==${QBITTORRENT_VERSION} && \ + echo "***** install qbitorrent-cli ****" && \ + mkdir /qbt && \ + if [ -z ${QBT_CLI_VERSION+x} ]; then \ + QBT_CLI_VERSION=$(curl -sL "https://api.github.com/repos/fedarovich/qbittorrent-cli/releases/latest" \ + | jq -r '. | .tag_name'); \ + fi && \ + curl -o \ + /tmp/qbt.tar.gz -L \ + "https://github.com/fedarovich/qbittorrent-cli/releases/download/${QBT_CLI_VERSION}/qbt-linux-alpine-x64-${QBT_CLI_VERSION#v}.tar.gz" && \ + tar xf \ + /tmp/qbt.tar.gz -C \ + /qbt && \ printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \ echo "**** cleanup ****" && \ rm -rf \ diff --git a/readme-vars.yml b/readme-vars.yml index 6ff859b..d769a09 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -62,6 +62,7 @@ app_setup_block: | # changelog changelogs: + - { date: "17.07.24:", desc: "Restore qbittorrent-cli as it now supports openssl 3." } - { date: "25.05.24:", desc: "Remove qbittorrent-cli as it still requires openssl 1.1 which is EOL." } - { date: "14.02.24:", desc: "Only set/override torrenting port if the optional env var is set." } - { date: "14.02.24:", desc: "Add torrenting port support." } diff --git a/root/usr/bin/qbt b/root/usr/bin/qbt new file mode 100755 index 0000000..87cefe5 --- /dev/null +++ b/root/usr/bin/qbt @@ -0,0 +1,15 @@ +#!/usr/bin/with-contenv bash +# shellcheck shell=bash + +# qbt bash wrapper to prompt user when trying to save password +if [[ "$@" == "settings set password" ]]; then + echo "Setting password is not supported" + echo "Please use --ask-for-password or --password" +elif [[ "$@" == "settings set"* ]]; then + /qbt/qbt "$@" +elif [[ "$@" != *"--ask-for-password"* ]] && [[ "$@" != *"--password"* ]];then + echo "Please use --ask-for-password or --password and ensure username/url are set" + /qbt/qbt "$@" +else + /qbt/qbt "$@" +fi