mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-14 03:21:30 +02:00
Update 91-configuration.sh
This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
#!/usr/bin/with-contenv bashio
|
#!/usr/bin/with-contenv bashio
|
||||||
|
|
||||||
|
##########
|
||||||
|
# INIT #
|
||||||
|
##########
|
||||||
|
|
||||||
# Define preferences line
|
# Define preferences line
|
||||||
cd /config/qBittorrent/
|
cd /config/qBittorrent/
|
||||||
LINE=$(sed -n '/Preferences/=' qBittorrent.conf)
|
LINE=$(sed -n '/Preferences/=' qBittorrent.conf)
|
||||||
@@ -37,15 +41,15 @@ CUSTOMUI=$(bashio::config 'customUI')
|
|||||||
|
|
||||||
### IF VUETORRENT
|
### IF VUETORRENT
|
||||||
if [ CUSTOMUI="vuetorrent" ];then
|
if [ CUSTOMUI="vuetorrent" ];then
|
||||||
CUSTOMUI="WDaan/VueTorrent"
|
CUSTOMUI="WDaan/VueTorrent"
|
||||||
curl -s -S -J -L -o /release.zip $(curl -s https://api.github.com/repos/WDaan/VueTorrent/releases/latest | grep -o "http.*release.zip") > /dev/null
|
curl -s -S -J -L -o /release.zip $(curl -s https://api.github.com/repos/WDaan/VueTorrent/releases/latest | grep -o "http.*release.zip") > /dev/null
|
||||||
mkdir -p /data/$CUSTOMUI
|
mkdir -p /data/$CUSTOMUI
|
||||||
unzip -o /release.zip -d /data/$CUSTOMUI/
|
unzip -o /release.zip -d /data/$CUSTOMUI/
|
||||||
rm /*.zip
|
rm /*.zip
|
||||||
CUSTOMUIDIR=$(find /data/$CUSTOMUI -iname "public" -type d)
|
CUSTOMUIDIR=$(find /data/$CUSTOMUI -iname "public" -type d)
|
||||||
FOLDER="$(dirname "$CUSTOMUIDIR")"
|
FOLDER="$(dirname "$CUSTOMUIDIR")"
|
||||||
sed -i "$LINE i\WebUI\\\AlternativeUIEnabled=true" /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
|
sed -i "$LINE i\WebUI\\\RootFolder=$CUSTOMUIDIR" /config/qBittorrent/qBittorrent.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
### IF qbit-matUI
|
### IF qbit-matUI
|
||||||
@@ -77,5 +81,9 @@ sed -i "$LINE i\WebUI\\\AuthSubnetWhitelist=$WHITELIST" qBittorrent.conf
|
|||||||
bashio::log.info "Whitelisted subsets will not require a password : $WHITELIST"
|
bashio::log.info "Whitelisted subsets will not require a password : $WHITELIST"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
##########
|
||||||
|
# CLOSE #
|
||||||
|
##########
|
||||||
|
|
||||||
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/qBittorrent"
|
bashio::log.info "Configuration can be found in /config/qBittorrent"
|
||||||
|
|||||||
Reference in New Issue
Block a user