diff --git a/qbittorrent/rootfs/etc/cont-init.d/91-configuration.sh b/qbittorrent/rootfs/etc/cont-init.d/91-configuration.sh index e7dba9963..6fefefb78 100644 --- a/qbittorrent/rootfs/etc/cont-init.d/91-configuration.sh +++ b/qbittorrent/rootfs/etc/cont-init.d/91-configuration.sh @@ -59,6 +59,20 @@ if bashio::config.has_value 'whitelist'; then bashio::log.info "Whitelisted subsets will not require a password : $WHITELIST" fi +################ +# USERNAME # +################ + +cd /config/qBittorrent/ +if bashio::config.has_value 'Username'; then + USERNAME=$(bashio::config 'Username') + #clean data + sed -i '/WebUI\\\Username/d' qBittorrent.conf + #add data + sed -i "$LINE i\WebUI\\\Username=$USERNAME" qBittorrent.conf + bashio::log.info "WEBUI username set to $USERNAME" +fi + ################ # Alternate UI # ################