diff --git a/docker-mods/vuetorrent/root/etc/cont-init.d/98-themepark b/docker-mods/vuetorrent/root/etc/cont-init.d/98-themepark
index ee3c30de..8ca812cd 100644
--- a/docker-mods/vuetorrent/root/etc/cont-init.d/98-themepark
+++ b/docker-mods/vuetorrent/root/etc/cont-init.d/98-themepark
@@ -6,6 +6,20 @@ if [ "${TP_HOTIO}" = true ]; then
APP_FILEPATH='/config/config/qBittorrent.conf'
INDEX_FILEPATH='/app/vuetorrent/public/index.html'
fi
+
+# Backup config
+if [[ ! -f "${APP_FILEPATH}.bak" ]]; then
+ echo "Creating qBittorrent.conf backup in /config."
+ cp -p ${APP_FILEPATH} "${APP_FILEPATH}.bak"
+fi
+
+# Restore qBittorrent.conf
+if [ "${TP_DISABLE_THEME}" = true ]; then
+ echo "Restoring backup of qBittorrent.conf"
+ sed -i "s/WebUI\\\AlternativeUIEnabled=.*$/WebUI\\\AlternativeUIEnabled=false/g" "${APP_FILEPATH}";
+ exit 0
+fi
+
# Display variables for troubleshooting
echo -e "Variables set:\\n\
'TP_DOMAIN'=${TP_DOMAIN}\\n\
@@ -113,6 +127,7 @@ if ! grep -q "${TP_DOMAIN}" "${INDEX_FILEPATH}"; then
echo '---------------------------------------------------------'
echo '| Adding the stylesheet to /vuetorrent/public/index.html |'
echo '---------------------------------------------------------'
- sed -i "s/<\/body>/<\/body> /g" "${INDEX_FILEPATH}"
+ sed -i "s/<\/body>/<\/body> /g" "${INDEX_FILEPATH}"
+ sed -i "s/<\/body>/<\/body> /g" "${INDEX_FILEPATH}"
printf 'Stylesheet set to %s on public index.html\n' "${TP_THEME}"
fi
\ No newline at end of file