#!/usr/bin/with-contenv bash echo '---------------------------' echo '|__Sonarr theme.park Mod__|' echo '---------------------------' # Display variables for troubleshooting echo -e "Variables set:\\n\ 'TP_DOMAIN'=${TP_DOMAIN}\\n\ 'TP_THEME'=${TP_THEME}\\n" # Set default if [ ! -n "${TP_DOMAIN}" ]; then echo "Setting TP_DOMAIN to default (gilbn.github.io)" TP_DOMAIN="gilbn.github.io" fi if [ ! -n "${TP_THEME}" ]; then echo "No theme set, defaulting to organizr-dark" TP_THEME="organizr-dark" fi # Adding stylesheets if ! grep -q ${TP_DOMAIN} /app/sonarr/bin/UI/index.html; then echo '---------------------------' echo '|__Adding the stylesheet__|' echo '---------------------------' sed -i "s/<\/head>/<\/head> /g" /app/sonarr/bin/UI/index.html echo "Stylesheet set to ${TP_THEME}\\n" fi