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"