Skip to content

Commit

Permalink
Servarr: Docker mods - Inject link tag into body
Browse files Browse the repository at this point in the history
instead of head.
  • Loading branch information
GilbN committed Jul 18, 2023
1 parent 80e58df commit 14a7d6c
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 48 deletions.
12 changes: 6 additions & 6 deletions docker-mods/lidarr/root/etc/cont-init.d/98-themepark
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ if ! grep -q "${TP_DOMAIN}/css/base" "${APP_FILEPATH}"; then
echo '---------------------------'
echo '| Adding the stylesheet |'
echo '---------------------------'
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/base\/lidarr\/lidarr-base.css'><\/head> /g" "${APP_FILEPATH}"
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/${THEME_TYPE}\/${TP_THEME}.css'><\/head> /g" "${APP_FILEPATH}"
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/base\/lidarr\/lidarr-base.css'><\/head> /g" "${LOGIN_FILEPATH}"
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/${THEME_TYPE}\/${TP_THEME}.css'><\/head> /g" "${LOGIN_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/base\/lidarr\/lidarr-base.css'> /g" "${APP_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/${THEME_TYPE}\/${TP_THEME}.css'> /g" "${APP_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/base\/lidarr\/lidarr-base.css'> /g" "${LOGIN_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/${THEME_TYPE}\/${TP_THEME}.css'> /g" "${LOGIN_FILEPATH}"
printf 'Stylesheet set to %s\n' "${TP_THEME}"
if [[ -n ${TP_ADDON} ]]; then
for addon in $(echo "$TP_ADDON" | tr "|" " "); do
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/addons\/lidarr\/${addon}\/${addon}.css'><\/head> /g" "${APP_FILEPATH}"
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/addons\/lidarr\/${addon}\/${addon}.css'><\/head> /g" "${LOGIN_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/addons\/lidarr\/${addon}\/${addon}.css'> /g" "${APP_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/addons\/lidarr\/${addon}\/${addon}.css'> /g" "${LOGIN_FILEPATH}"
printf 'Added custom addon: %s\n\n' "${addon}"
done
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ if ! grep -q "${TP_DOMAIN}/css/base" "${APP_FILEPATH}"; then
echo '---------------------------'
echo '| Adding the stylesheet |'
echo '---------------------------'
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/base\/lidarr\/lidarr-base.css'><\/head> /g" "${APP_FILEPATH}"
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/${THEME_TYPE}\/${TP_THEME}.css'><\/head> /g" "${APP_FILEPATH}"
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/base\/lidarr\/lidarr-base.css'><\/head> /g" "${LOGIN_FILEPATH}"
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/${THEME_TYPE}\/${TP_THEME}.css'><\/head> /g" "${LOGIN_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/base\/lidarr\/lidarr-base.css'> /g" "${APP_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/${THEME_TYPE}\/${TP_THEME}.css'> /g" "${APP_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/base\/lidarr\/lidarr-base.css'> /g" "${LOGIN_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/${THEME_TYPE}\/${TP_THEME}.css'> /g" "${LOGIN_FILEPATH}"
printf 'Stylesheet set to %s\n' "${TP_THEME}"
if [[ -n ${TP_ADDON} ]]; then
for addon in $(echo "$TP_ADDON" | tr "|" " "); do
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/addons\/lidarr\/${addon}\/${addon}.css'><\/head> /g" "${APP_FILEPATH}"
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/addons\/lidarr\/${addon}\/${addon}.css'><\/head> /g" "${LOGIN_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/addons\/lidarr\/${addon}\/${addon}.css'> /g" "${APP_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/addons\/lidarr\/${addon}\/${addon}.css'> /g" "${LOGIN_FILEPATH}"
printf 'Added custom addon: %s\n\n' "${addon}"
done
fi
Expand Down
12 changes: 6 additions & 6 deletions docker-mods/prowlarr/root/etc/cont-init.d/98-themepark
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ if ! grep -q "${TP_DOMAIN}/css/base" "${APP_FILEPATH}"; then
echo '---------------------------'
echo '| Adding the stylesheet |'
echo '---------------------------'
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/base\/prowlarr\/prowlarr-base.css'><\/head> /g" "${APP_FILEPATH}"
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/${THEME_TYPE}\/${TP_THEME}.css'><\/head> /g" "${APP_FILEPATH}"
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/base\/prowlarr\/prowlarr-base.css'><\/head> /g" "${LOGIN_FILEPATH}"
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/${THEME_TYPE}\/${TP_THEME}.css'><\/head> /g" "${LOGIN_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/base\/prowlarr\/prowlarr-base.css'> /g" "${APP_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/${THEME_TYPE}\/${TP_THEME}.css'> /g" "${APP_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/base\/prowlarr\/prowlarr-base.css'> /g" "${LOGIN_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/${THEME_TYPE}\/${TP_THEME}.css'> /g" "${LOGIN_FILEPATH}"
printf 'Stylesheet set to %s\n' "${TP_THEME}"
if [[ -n ${TP_ADDON} ]]; then
for addon in $(echo "$TP_ADDON" | tr "|" " "); do
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/addons\/prowlarr\/${addon}\/${addon}.css'><\/head> /g" "${APP_FILEPATH}"
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/addons\/prowlarr\/${addon}\/${addon}.css'><\/head> /g" "${LOGIN_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/addons\/prowlarr\/${addon}\/${addon}.css'> /g" "${APP_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/addons\/prowlarr\/${addon}\/${addon}.css'> /g" "${LOGIN_FILEPATH}"
printf 'Added custom addon: %s\n\n' "${addon}"
done
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ if ! grep -q "${TP_DOMAIN}/css/base" "${APP_FILEPATH}"; then
echo '---------------------------'
echo '| Adding the stylesheet |'
echo '---------------------------'
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/base\/prowlarr\/prowlarr-base.css'><\/head> /g" "${APP_FILEPATH}"
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/${THEME_TYPE}\/${TP_THEME}.css'><\/head> /g" "${APP_FILEPATH}"
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/base\/prowlarr\/prowlarr-base.css'><\/head> /g" "${LOGIN_FILEPATH}"
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/${THEME_TYPE}\/${TP_THEME}.css'><\/head> /g" "${LOGIN_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/base\/prowlarr\/prowlarr-base.css'> /g" "${APP_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/${THEME_TYPE}\/${TP_THEME}.css'> /g" "${APP_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/base\/prowlarr\/prowlarr-base.css'> /g" "${LOGIN_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/${THEME_TYPE}\/${TP_THEME}.css'> /g" "${LOGIN_FILEPATH}"
printf 'Stylesheet set to %s\n' "${TP_THEME}"
if [[ -n ${TP_ADDON} ]]; then
for addon in $(echo "$TP_ADDON" | tr "|" " "); do
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/addons\/prowlarr\/${addon}\/${addon}.css'><\/head> /g" "${APP_FILEPATH}"
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/addons\/prowlarr\/${addon}\/${addon}.css'><\/head> /g" "${LOGIN_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/addons\/prowlarr\/${addon}\/${addon}.css'> /g" "${APP_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/addons\/prowlarr\/${addon}\/${addon}.css'> /g" "${LOGIN_FILEPATH}"
printf 'Added custom addon: %s\n\n' "${addon}"
done
fi
Expand Down
12 changes: 6 additions & 6 deletions docker-mods/radarr/root/etc/cont-init.d/98-themepark
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ if ! grep -q "${TP_DOMAIN}/css/base" "${APP_FILEPATH}"; then
echo '---------------------------'
echo '| Adding the stylesheet |'
echo '---------------------------'
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/base\/radarr\/radarr-base.css'><\/head> /g" "${APP_FILEPATH}"
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/${THEME_TYPE}\/${TP_THEME}.css'><\/head> /g" "${APP_FILEPATH}"
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/base\/radarr\/radarr-base.css'><\/head> /g" "${LOGIN_FILEPATH}"
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/${THEME_TYPE}\/${TP_THEME}.css'><\/head> /g" "${LOGIN_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/base\/radarr\/radarr-base.css'> /g" "${APP_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/${THEME_TYPE}\/${TP_THEME}.css'> /g" "${APP_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/base\/radarr\/radarr-base.css'> /g" "${LOGIN_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/${THEME_TYPE}\/${TP_THEME}.css'> /g" "${LOGIN_FILEPATH}"
printf 'Stylesheet set to %s\n' "${TP_THEME}"
if [[ -n ${TP_ADDON} ]]; then
for addon in $(echo "$TP_ADDON" | tr "|" " "); do
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/addons\/radarr\/${addon}\/${addon}.css'><\/head> /g" "${APP_FILEPATH}"
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/addons\/radarr\/${addon}\/${addon}.css'><\/head> /g" "${LOGIN_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/addons\/radarr\/${addon}\/${addon}.css'> /g" "${APP_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/addons\/radarr\/${addon}\/${addon}.css'> /g" "${LOGIN_FILEPATH}"
printf 'Added custom addon: %s\n\n' "${addon}"
done
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ if ! grep -q "${TP_DOMAIN}/css/base" "${APP_FILEPATH}"; then
echo '---------------------------'
echo '| Adding the stylesheet |'
echo '---------------------------'
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/base\/radarr\/radarr-base.css'><\/head> /g" "${APP_FILEPATH}"
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/${THEME_TYPE}\/${TP_THEME}.css'><\/head> /g" "${APP_FILEPATH}"
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/base\/radarr\/radarr-base.css'><\/head> /g" "${LOGIN_FILEPATH}"
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/${THEME_TYPE}\/${TP_THEME}.css'><\/head> /g" "${LOGIN_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/base\/radarr\/radarr-base.css'> /g" "${APP_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/${THEME_TYPE}\/${TP_THEME}.css'> /g" "${APP_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/base\/radarr\/radarr-base.css'> /g" "${LOGIN_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/${THEME_TYPE}\/${TP_THEME}.css'> /g" "${LOGIN_FILEPATH}"
printf 'Stylesheet set to %s\n' "${TP_THEME}"
if [[ -n ${TP_ADDON} ]]; then
for addon in $(echo "$TP_ADDON" | tr "|" " "); do
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/addons\/radarr\/${addon}\/${addon}.css'><\/head> /g" "${APP_FILEPATH}"
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/addons\/radarr\/${addon}\/${addon}.css'><\/head> /g" "${LOGIN_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/addons\/radarr\/${addon}\/${addon}.css'> /g" "${APP_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/addons\/radarr\/${addon}\/${addon}.css'> /g" "${LOGIN_FILEPATH}"
printf 'Added custom addon: %s\n\n' "${addon}"
done
fi
Expand Down
12 changes: 6 additions & 6 deletions docker-mods/sonarr/root/etc/cont-init.d/98-themepark
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ if ! grep -q "${TP_DOMAIN}/css/base" "${APP_FILEPATH}"; then
echo '---------------------------'
echo '| Adding the stylesheet |'
echo '---------------------------'
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/base\/sonarr\/sonarr-base.css'><\/head> /g" "${APP_FILEPATH}"
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/${THEME_TYPE}\/${TP_THEME}.css'><\/head> /g" "${APP_FILEPATH}"
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/base\/sonarr\/sonarr-base.css'><\/head> /g" "${LOGIN_FILEPATH}"
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/${THEME_TYPE}\/${TP_THEME}.css'><\/head> /g" "${LOGIN_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/base\/sonarr\/sonarr-base.css'> /g" "${APP_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/${THEME_TYPE}\/${TP_THEME}.css'> /g" "${APP_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/base\/sonarr\/sonarr-base.css'> /g" "${LOGIN_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/${THEME_TYPE}\/${TP_THEME}.css'> /g" "${LOGIN_FILEPATH}"
printf 'Stylesheet set to %s\n' "${TP_THEME}"
if [[ -n ${TP_ADDON} ]]; then
for addon in $(echo "$TP_ADDON" | tr "|" " "); do
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/addons\/sonarr\/${addon}\/${addon}.css'><\/head> /g" "${APP_FILEPATH}"
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/addons\/sonarr\/${addon}\/${addon}.css'><\/head> /g" "${LOGIN_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/addons\/sonarr\/${addon}\/${addon}.css'> /g" "${APP_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/addons\/sonarr\/${addon}\/${addon}.css'> /g" "${LOGIN_FILEPATH}"
printf 'Added custom addon: %s\n\n' "${addon}"
done
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ if ! grep -q "${TP_DOMAIN}/css/base" "${APP_FILEPATH}"; then
echo '---------------------------'
echo '| Adding the stylesheet |'
echo '---------------------------'
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/base\/sonarr\/sonarr-base.css'><\/head> /g" "${APP_FILEPATH}"
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/${THEME_TYPE}\/${TP_THEME}.css'><\/head> /g" "${APP_FILEPATH}"
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/base\/sonarr\/sonarr-base.css'><\/head> /g" "${LOGIN_FILEPATH}"
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/${THEME_TYPE}\/${TP_THEME}.css'><\/head> /g" "${LOGIN_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/base\/sonarr\/sonarr-base.css'> /g" "${APP_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/${THEME_TYPE}\/${TP_THEME}.css'> /g" "${APP_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/base\/sonarr\/sonarr-base.css'> /g" "${LOGIN_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/${THEME_TYPE}\/${TP_THEME}.css'> /g" "${LOGIN_FILEPATH}"
printf 'Stylesheet set to %s\n' "${TP_THEME}"
if [[ -n ${TP_ADDON} ]]; then
for addon in $(echo "$TP_ADDON" | tr "|" " "); do
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/addons\/sonarr\/${addon}\/${addon}.css'><\/head> /g" "${APP_FILEPATH}"
sed -i "s/<\/head>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/addons\/sonarr\/${addon}\/${addon}.css'><\/head> /g" "${LOGIN_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/addons\/sonarr\/${addon}\/${addon}.css'> /g" "${APP_FILEPATH}"
sed -i "s/<body>/<body><link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/addons\/sonarr\/${addon}\/${addon}.css'> /g" "${LOGIN_FILEPATH}"
printf 'Added custom addon: %s\n\n' "${addon}"
done
fi
Expand Down

0 comments on commit 14a7d6c

Please sign in to comment.