mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 02:11:01 +01:00
Update 91-qbittorrent_configuration.sh
This commit is contained in:
@@ -124,36 +124,39 @@ mkdir -p /webui
|
||||
chown abc:abc /webui
|
||||
|
||||
if bashio::config.has_value 'customUI'; then
|
||||
### Variables
|
||||
CUSTOMUI=$(bashio::config 'customUI')
|
||||
bashio::log.info "Alternate UI enabled : $CUSTOMUI. If webui don't work, disable this option"
|
||||
if [ ! "$CUSTOMUI" = default ]; then
|
||||
### Variables
|
||||
CUSTOMUI=$(bashio::config 'customUI')
|
||||
bashio::log.info "Alternate UI enabled : $CUSTOMUI. If webui don't work, disable this option"
|
||||
|
||||
### Download WebUI
|
||||
case $CUSTOMUI in
|
||||
"vuetorrent")
|
||||
curl -s -S -J -L -o /webui/release.zip "$(curl -s https://api.github.com/repos/WDaan/VueTorrent/releases/latest | grep -o "http.*vuetorrent.zip")" >/dev/null
|
||||
;;
|
||||
### Download WebUI
|
||||
case $CUSTOMUI in
|
||||
"vuetorrent")
|
||||
curl -s -S -J -L -o /webui/release.zip "$(curl -s https://api.github.com/repos/WDaan/VueTorrent/releases/latest | grep -o "http.*vuetorrent.zip")" >/dev/null
|
||||
;;
|
||||
|
||||
"qbit-matUI")
|
||||
curl -s -S -J -L -o /webui/release.zip "$(curl -s https://api.github.com/repos/bill-ahmed/qbit-matUI/releases/latest | grep -o "http.*Unix.*.zip")" >/dev/null
|
||||
;;
|
||||
"qbit-matUI")
|
||||
curl -s -S -J -L -o /webui/release.zip "$(curl -s https://api.github.com/repos/bill-ahmed/qbit-matUI/releases/latest | grep -o "http.*Unix.*.zip")" >/dev/null
|
||||
;;
|
||||
|
||||
"qb-web")
|
||||
curl -s -S -J -L -o /webui/release.zip "$(curl -s https://api.github.com/repos/CzBiX/qb-web/releases | grep -o "http.*qb-web-.*zip")" >/dev/null
|
||||
;;
|
||||
esac
|
||||
"qb-web")
|
||||
curl -s -S -J -L -o /webui/release.zip "$(curl -s https://api.github.com/repos/CzBiX/qb-web/releases | grep -o "http.*qb-web-.*zip")" >/dev/null
|
||||
;;
|
||||
|
||||
### Install WebUI
|
||||
mkdir -p /webui/"$CUSTOMUI"
|
||||
unzip -q /webui/release.zip -d /webui/"$CUSTOMUI"
|
||||
rm /webui/*.zip
|
||||
CUSTOMUIDIR="$(dirname "$(find /webui/"$CUSTOMUI" -iname "public" -type d)")"
|
||||
# Set qbittorrent
|
||||
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
|
||||
esac
|
||||
|
||||
### Install WebUI
|
||||
mkdir -p /webui/"$CUSTOMUI"
|
||||
unzip -q /webui/release.zip -d /webui/"$CUSTOMUI"
|
||||
rm /webui/*.zip
|
||||
CUSTOMUIDIR="$(dirname "$(find /webui/"$CUSTOMUI" -iname "public" -type d)")"
|
||||
# Set qbittorrent
|
||||
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
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user