From 89d354e0e9e2451701f9e3b87b6c022fd8d22d3b Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Fri, 28 Oct 2022 08:27:48 +0100 Subject: [PATCH] Update 91-qbittorrent_configuration.sh --- .../91-qbittorrent_configuration.sh | 18 +++++++++++------- 1 file changed, 11 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 421de0e5b..392320843 100644 --- a/qbittorrent/rootfs/etc/cont-init.d/91-qbittorrent_configuration.sh +++ b/qbittorrent/rootfs/etc/cont-init.d/91-qbittorrent_configuration.sh @@ -129,14 +129,18 @@ fi # Alternate UI # ################ -# Clean data -sed -i '/AlternativeUIEnabled/d' qBittorrent.conf -sed -i '/RootFolder/d' qBittorrent.conf -rm -f -r /webui -mkdir -p /webui -chown abc:abc /webui - CUSTOMUI=$(bashio::config 'customUI') + +# Clean data if not custom +if [ ! "$CUSTOMUI" = custom ]; then + sed -i '/AlternativeUIEnabled/d' qBittorrent.conf + sed -i '/RootFolder/d' qBittorrent.conf + rm -f -r /webui + mkdir -p /webui + chown abc:abc /webui +fi + +# Install webui if bashio::config.has_value 'customUI' && [ ! "$CUSTOMUI" = default ] && [ ! "$CUSTOMUI" = custom ]; then ### Variables bashio::log.info "Alternate UI enabled : $CUSTOMUI. If webui don't work, disable this option"