From 52846f769f714154c1b0fda5a62f51f4ebbaa782 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Wed, 29 Dec 2021 13:38:09 +0100 Subject: [PATCH] revert --- qbittorrent/CHANGELOG.md | 1 - qbittorrent/Dockerfile | 4 ++-- qbittorrent/rootfs/etc/cont-init.d/20-folders.sh | 16 ---------------- .../cont-init.d/91-qbittorrent_configuration.sh | 12 ++++++------ qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh | 6 +++--- 5 files changed, 11 insertions(+), 28 deletions(-) delete mode 100644 qbittorrent/rootfs/etc/cont-init.d/20-folders.sh diff --git a/qbittorrent/CHANGELOG.md b/qbittorrent/CHANGELOG.md index bac68af71..35eb5e419 100644 --- a/qbittorrent/CHANGELOG.md +++ b/qbittorrent/CHANGELOG.md @@ -1,4 +1,3 @@ -- Cleanup: config base folder changed to /config/addons_config (thanks @bruvv) - Removed watchdog - New standardized logic for Dockerfile build and packages installation - Allow mounting nvme diff --git a/qbittorrent/Dockerfile b/qbittorrent/Dockerfile index 995781b3a..5c6dabbc5 100644 --- a/qbittorrent/Dockerfile +++ b/qbittorrent/Dockerfile @@ -37,8 +37,8 @@ RUN \ && sed -i 's/{PGID:-911}/(bashio::config "PGID")/g' /etc/cont-init.d/10-adduser \ \ # Correct permissions - && sed -i 's=/config=/config/addons_config/qBittorrent || true=g' /etc/cont-init.d/10-adduser \ - && sed -i 's= /config=/config/addons_config/qBittorrent || true=g' /etc/cont-init.d/30-config \ + && sed -i 's=/config=/config/qBittorrent || true=g' /etc/cont-init.d/10-adduser \ + && sed -i 's= /config=/config/qBittorrent || true=g' /etc/cont-init.d/30-config \ \ # Set download folder to /share && sed -i 's|/downloads/|/share/qBittorrent/|g' /defaults/qBittorrent.conf \ diff --git a/qbittorrent/rootfs/etc/cont-init.d/20-folders.sh b/qbittorrent/rootfs/etc/cont-init.d/20-folders.sh deleted file mode 100644 index d35716b37..000000000 --- a/qbittorrent/rootfs/etc/cont-init.d/20-folders.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/with-contenv bash - -slug=qBittorrent - -if [ -d /config/$slug ]; then - echo "Moving to new location /config/addons_config/$slug" - mkdir -p /config/addons_config/$slug - chmod 777 /config/addons_config/$slug - mv /config/$slug/* /config/addons_config/$slug/ -fi - -if [ ! -d /config/addons_config/$slug ]; then - echo "Creating /config/addons_config/$slug" - mkdir -p /config/addons_config/$slug - chmod 777 /config/addons_config/$slug -fi diff --git a/qbittorrent/rootfs/etc/cont-init.d/91-qbittorrent_configuration.sh b/qbittorrent/rootfs/etc/cont-init.d/91-qbittorrent_configuration.sh index 7e5335281..6408e6c52 100644 --- a/qbittorrent/rootfs/etc/cont-init.d/91-qbittorrent_configuration.sh +++ b/qbittorrent/rootfs/etc/cont-init.d/91-qbittorrent_configuration.sh @@ -5,7 +5,7 @@ ########## # Define preferences line -cd /config/addons_config/qBittorrent/ +cd /config/qBittorrent/ LINE=$(sed -n '/Preferences/=' qBittorrent.conf) LINE=$((LINE + 1)) @@ -70,7 +70,7 @@ fi # WHITELIST # ################ -cd /config/addons_config/qBittorrent/ +cd /config/qBittorrent/ if bashio::config.has_value 'whitelist'; then WHITELIST=$(bashio::config 'whitelist') #clean data @@ -84,7 +84,7 @@ fi # USERNAME # ############### -cd /config/addons_config/qBittorrent/ +cd /config/qBittorrent/ if bashio::config.has_value 'Username'; then USERNAME=$(bashio::config 'Username') #clean data @@ -131,8 +131,8 @@ if bashio::config.has_value 'customUI'; then rm /webui/*.zip CUSTOMUIDIR="$(dirname "$(find /webui/$CUSTOMUI -iname "public" -type d)")" # Set qbittorrent - sed -i "$LINE i\WebUI\\\AlternativeUIEnabled=true" /config/addons_config/qBittorrent/qBittorrent.conf - sed -i "$LINE i\WebUI\\\RootFolder=$CUSTOMUIDIR" /config/addons_config/qBittorrent/qBittorrent.conf + sed -i "$LINE i\WebUI\\\AlternativeUIEnabled=true" /config/qBittorrent/qBittorrent.conf + sed -i "$LINE i\WebUI\\\RootFolder=$CUSTOMUIDIR" /config/qBittorrent/qBittorrent.conf # Set nginx #sed -i "s=/vuetorrent/public/=$CUSTOMUIDIR/public/=g" /etc/nginx/servers/ingress.conf #sed -i "s=vue.torrent=$CUSTOMUI.torrent=g" /etc/nginx/servers/ingress.conf @@ -144,4 +144,4 @@ fi ########## bashio::log.info "Default username/password : admin/adminadmin" -bashio::log.info "Configuration can be found in /config/addons_config/qBittorrent" +bashio::log.info "Configuration can be found in /config/qBittorrent" diff --git a/qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh b/qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh index 8ca214ab2..728139953 100644 --- a/qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh +++ b/qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh @@ -37,9 +37,9 @@ if bashio::config.true 'openvpn_enabled'; then # CONFIGURE QBITTORRENT # ######################### - QBT_CONFIG_FILE="/config/addons_config/qBittorrent/qBittorrent.conf" + QBT_CONFIG_FILE="/config/qBittorrent/qBittorrent.conf" # Define preferences line - cd /config/addons_config/qBittorrent/ + cd /config/qBittorrent/ LINE=$(sed -n '/Preferences/=' qBittorrent.conf) LINE=$((LINE + 1)) @@ -76,7 +76,7 @@ else # REMOVE OPENVPN # ################## # Ensure no redirection by removing the direction tag - cd /config/addons_config/qBittorrent/ + cd /config/qBittorrent/ sed -i '/Interface/d' qBittorrent.conf bashio::log.info "Direct connection without VPN enabled"