mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-07-02 03:58:45 +02:00
Revert
This commit is contained in:
@@ -6,14 +6,15 @@
|
|||||||
##########
|
##########
|
||||||
|
|
||||||
# Define preferences line
|
# Define preferences line
|
||||||
mkdir -p /config/addons_config/qbittorrent
|
CONFIG_LOCATION=/config/addons_config/qBittorrent
|
||||||
|
mkdir -p "$CONFIG_LOCATION"
|
||||||
|
|
||||||
# copy default config
|
# copy default config
|
||||||
if [ ! -f /config/addons_config/qbittorrent/qBittorrent.conf ]; then
|
if [ ! -f "$CONFIG_LOCATION"/qBittorrent.conf ]; then
|
||||||
cp /defaults/qBittorrent.conf /config/addons_config/qbittorrent/qBittorrent.conf
|
cp /defaults/qBittorrent.conf "$CONFIG_LOCATION"/qBittorrent.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd /config/addons_config/qbittorrent/ || true
|
cd "$CONFIG_LOCATION"/ || true
|
||||||
LINE=$(sed -n '/Preferences/=' qBittorrent.conf)
|
LINE=$(sed -n '/Preferences/=' qBittorrent.conf)
|
||||||
LINE=$((LINE + 1))
|
LINE=$((LINE + 1))
|
||||||
|
|
||||||
@@ -101,7 +102,7 @@ fi
|
|||||||
# WHITELIST #
|
# WHITELIST #
|
||||||
################
|
################
|
||||||
|
|
||||||
cd /config/addons_config/qbittorrent/ || true
|
cd "$CONFIG_LOCATION"/ || true
|
||||||
if bashio::config.has_value 'whitelist'; then
|
if bashio::config.has_value 'whitelist'; then
|
||||||
WHITELIST=$(bashio::config 'whitelist')
|
WHITELIST=$(bashio::config 'whitelist')
|
||||||
#clean data
|
#clean data
|
||||||
@@ -115,7 +116,7 @@ fi
|
|||||||
# USERNAME #
|
# USERNAME #
|
||||||
###############
|
###############
|
||||||
|
|
||||||
cd /config/addons_config/qbittorrent/ || true
|
cd "$CONFIG_LOCATION"/ || true
|
||||||
if bashio::config.has_value 'Username'; then
|
if bashio::config.has_value 'Username'; then
|
||||||
USERNAME=$(bashio::config 'Username')
|
USERNAME=$(bashio::config 'Username')
|
||||||
#clean data
|
#clean data
|
||||||
@@ -180,4 +181,4 @@ fi
|
|||||||
##########
|
##########
|
||||||
|
|
||||||
bashio::log.info "Default username/password : admin/adminadmin"
|
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"
|
||||||
|
|||||||
Reference in New Issue
Block a user