hacktoberfestthemedark-themesonarrradarrplexorganizrnginxcustom-csscssthemes-customthemes-csssubfilterguacamoleskinsombilidarrdocker-modsdark-themesdark-mode
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
916 B
29 lines
916 B
#!/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>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/theme.park\/CSS\/themes\/sonarr\/${TP_THEME}.css'><\/head> /g" /app/sonarr/bin/UI/index.html
|
|
echo "Stylesheet set to ${TP_THEME}\\n"
|
|
fi
|