From c52292109f5e38c7a925448870ba1f4d8f3d2a95 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Thu, 17 Nov 2022 07:44:41 +0100 Subject: [PATCH] Revert --- .../cont-init.d/91-qbittorrent_configuration.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) 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 7e3132382..8eee451d8 100644 --- a/qbittorrent/rootfs/etc/cont-init.d/91-qbittorrent_configuration.sh +++ b/qbittorrent/rootfs/etc/cont-init.d/91-qbittorrent_configuration.sh @@ -6,14 +6,15 @@ ########## # Define preferences line -mkdir -p /config/addons_config/qbittorrent +CONFIG_LOCATION=/config/addons_config/qBittorrent +mkdir -p "$CONFIG_LOCATION" # copy default config -if [ ! -f /config/addons_config/qbittorrent/qBittorrent.conf ]; then - cp /defaults/qBittorrent.conf /config/addons_config/qbittorrent/qBittorrent.conf +if [ ! -f "$CONFIG_LOCATION"/qBittorrent.conf ]; then + cp /defaults/qBittorrent.conf "$CONFIG_LOCATION"/qBittorrent.conf fi -cd /config/addons_config/qbittorrent/ || true +cd "$CONFIG_LOCATION"/ || true LINE=$(sed -n '/Preferences/=' qBittorrent.conf) LINE=$((LINE + 1)) @@ -101,7 +102,7 @@ fi # WHITELIST # ################ -cd /config/addons_config/qbittorrent/ || true +cd "$CONFIG_LOCATION"/ || true if bashio::config.has_value 'whitelist'; then WHITELIST=$(bashio::config 'whitelist') #clean data @@ -115,7 +116,7 @@ fi # USERNAME # ############### -cd /config/addons_config/qbittorrent/ || true +cd "$CONFIG_LOCATION"/ || true if bashio::config.has_value 'Username'; then USERNAME=$(bashio::config 'Username') #clean data @@ -180,4 +181,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_LOCATION"