mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-14 19:41:31 +02:00
Update 91-qbittorrent_configuration.sh
This commit is contained in:
@@ -32,12 +32,12 @@ fi
|
|||||||
# Default folder #
|
# Default folder #
|
||||||
##################
|
##################
|
||||||
|
|
||||||
# Set variable
|
|
||||||
DOWNLOADS=$(bashio::config 'SavePath')
|
|
||||||
|
|
||||||
# Set configuration
|
# Set configuration
|
||||||
if bashio::config.has_value 'SavePath'; then
|
if bashio::config.has_value 'SavePath'; then
|
||||||
|
|
||||||
|
# Set variable
|
||||||
|
DOWNLOADS=$(bashio::config 'SavePath')
|
||||||
|
|
||||||
# Replace save path
|
# Replace save path
|
||||||
CURRENTSAVEPATH=$(sed -n '/Downloads\SavePath/p' qBittorrent.conf)
|
CURRENTSAVEPATH=$(sed -n '/Downloads\SavePath/p' qBittorrent.conf)
|
||||||
sed -i "s|${CURRENTSAVEPATH#*=}|$DOWNLOADS|g" qBittorrent.conf || \
|
sed -i "s|${CURRENTSAVEPATH#*=}|$DOWNLOADS|g" qBittorrent.conf || \
|
||||||
@@ -45,7 +45,9 @@ if bashio::config.has_value 'SavePath'; then
|
|||||||
|
|
||||||
# Replace session save path
|
# Replace session save path
|
||||||
CURRENTSAVEPATH=$(sed -n '/Session\DefaultSavePath/p' qBittorrent.conf)
|
CURRENTSAVEPATH=$(sed -n '/Session\DefaultSavePath/p' qBittorrent.conf)
|
||||||
sed -i "s|${CURRENTSAVEPATH#*=}|$DOWNLOADS|g" qBittorrent.conf || true
|
sed -i "s|${CURRENTSAVEPATH#*=}|$DOWNLOADS|g" qBittorrent.conf || \
|
||||||
|
sed -i "1a [BitTorrent] qBittorrent.conf;
|
||||||
|
sed -i "2a Session\DefaultSavePath=$DOWNLOADS" qBittorrent.conf
|
||||||
|
|
||||||
# Info
|
# Info
|
||||||
bashio::log.info "Downloads can be found in $DOWNLOADS"
|
bashio::log.info "Downloads can be found in $DOWNLOADS"
|
||||||
|
|||||||
Reference in New Issue
Block a user