use bash wrapper for qbt and do not use single bin

This commit is contained in:
thelamer
2022-03-03 11:12:44 -08:00
committed by Ryan Kuba
parent 0ec11ff56a
commit afe1de3e7f
4 changed files with 32 additions and 9 deletions

View File

@@ -49,10 +49,13 @@ RUN \
apk add -U --upgrade --no-cache \
qbittorrent-nox==${QBITTORRENT_VERSION} && \
echo "***** install qbitorrent-cli ****" && \
mkdir /qbt && \
curl -L \
-o /usr/bin/qbt \
"https://github.com/linuxserver/docker-qbittorrent/releases/download/qbt-${QBT_VERSION}/qbt" && \
chmod +x /usr/bin/qbt && \
-o /tmp/qbt.tar.gz \
"https://github.com/linuxserver/docker-qbittorrent/releases/download/qbt-${QBT_VERSION}/qbt.tar.gz" && \
tar xf \
/tmp/qbt.tar.gz -C \
/qbt && \
echo "**** cleanup ****" && \
apk del --purge \
build-dependencies && \

View File

@@ -49,10 +49,13 @@ RUN \
apk add -U --upgrade --no-cache \
qbittorrent-nox==${QBITTORRENT_VERSION} && \
echo "***** install qbitorrent-cli ****" && \
mkdir /qbt && \
curl -L \
-o /usr/bin/qbt \
"https://github.com/linuxserver/docker-qbittorrent/releases/download/qbt-${QBT_VERSION}/qbt-arm64" && \
chmod +x /usr/bin/qbt && \
-o /tmp/qbt.tar.gz \
"https://github.com/linuxserver/docker-qbittorrent/releases/download/qbt-${QBT_VERSION}/qbt-arm64.tar.gz" && \
tar xf \
/tmp/qbt.tar.gz -C \
/qbt && \
echo "**** cleanup ****" && \
apk del --purge \
build-dependencies && \

View File

@@ -51,10 +51,13 @@ RUN \
apk add -U --upgrade --no-cache \
qbittorrent-nox==${QBITTORRENT_VERSION} && \
echo "***** install qbitorrent-cli ****" && \
mkdir /qbt && \
curl -L \
-o /usr/bin/qbt \
"https://github.com/linuxserver/docker-qbittorrent/releases/download/qbt-${QBT_VERSION}/qbt-arm" && \
chmod +x /usr/bin/qbt && \
-o /tmp/qbt.tar.gz \
"https://github.com/linuxserver/docker-qbittorrent/releases/download/qbt-${QBT_VERSION}/qbt-arm.tar.gz" && \
tar xf \
/tmp/qbt.tar.gz -C \
/qbt && \
echo "**** cleanup ****" && \
apk del --purge \
build-dependencies && \

14
root/usr/bin/qbt Executable file
View File

@@ -0,0 +1,14 @@
#!/usr/bin/with-contenv 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