From a0bac70decf8d904b086b86eac1fd33b56fb77b9 Mon Sep 17 00:00:00 2001 From: gilbN <24592972+gilbN@users.noreply.github.com> Date: Sun, 18 Apr 2021 14:48:44 +0200 Subject: [PATCH] hotio paths --- nzbget/Dockerfile | 4 ++-- nzbget/root/etc/cont-init.d/98-themepark | 10 ++++++++-- plex/Dockerfile | 4 ++-- plex/root/etc/cont-init.d/98-themepark | 12 +++++++++--- qbittorrent/Dockerfile | 4 ++-- radarr/Dockerfile | 1 + radarr/root/etc/cont-init.d/98-themepark | 15 +++++++++++---- sonarr/Dockerfile | 3 ++- sonarr/root/etc/cont-init.d/98-themepark | 15 +++++++++++---- 9 files changed, 48 insertions(+), 20 deletions(-) diff --git a/nzbget/Dockerfile b/nzbget/Dockerfile index 0eff97af..281f6d6e 100644 --- a/nzbget/Dockerfile +++ b/nzbget/Dockerfile @@ -1,6 +1,6 @@ FROM scratch - LABEL maintainer="GilbN" - +LABEL maintainer="GilbN" +LABEL app="NZBGet" # copy local files. COPY root/ / \ No newline at end of file diff --git a/nzbget/root/etc/cont-init.d/98-themepark b/nzbget/root/etc/cont-init.d/98-themepark index 887b7546..5aec521c 100644 --- a/nzbget/root/etc/cont-init.d/98-themepark +++ b/nzbget/root/etc/cont-init.d/98-themepark @@ -4,6 +4,7 @@ echo '---------------------------' echo '| NZBGet theme.park Mod |' echo '---------------------------' +APP_FILEPATH='/app/nzbget/webui/index.html' # Display variables for troubleshooting echo -e "Variables set:\\n\ 'TP_DOMAIN'=${TP_DOMAIN}\\n\ @@ -20,12 +21,17 @@ if [[ -z ${TP_THEME} ]]; then TP_THEME='organizr-dark' fi +if [ "${TP_HOTIO}" = true ]; then + echo 'Changing to Hotio file paths!' + APP_FILEPATH='/app/webui/index.html' +fi + # Adding stylesheets -if ! grep -q "${TP_DOMAIN}" /app/nzbget/webui/index.html; then +if ! grep -q "${TP_DOMAIN}" ${APP_FILEPATH}; then echo '---------------------------' echo '| Adding the stylesheet |' echo '---------------------------' - sed -i "s/<\/head>/<\/head> /g" /app/nzbget/webui/index.html + sed -i "s/<\/head>/<\/head> /g" ${APP_FILEPATH} printf 'Stylesheet set to %s\n' "${TP_THEME} " fi \ No newline at end of file diff --git a/plex/Dockerfile b/plex/Dockerfile index 0eff97af..53e5db7c 100644 --- a/plex/Dockerfile +++ b/plex/Dockerfile @@ -1,6 +1,6 @@ FROM scratch - LABEL maintainer="GilbN" - +LABEL maintainer="GilbN" +LABEL app="Plex" # copy local files. COPY root/ / \ No newline at end of file diff --git a/plex/root/etc/cont-init.d/98-themepark b/plex/root/etc/cont-init.d/98-themepark index aae3175e..4d96508c 100644 --- a/plex/root/etc/cont-init.d/98-themepark +++ b/plex/root/etc/cont-init.d/98-themepark @@ -4,6 +4,7 @@ echo '-------------------------' echo '| Plex theme.park Mod |' echo '-------------------------' +APP_FILEPATH='/usr/lib/plexmediaserver/Resources/Plug-ins-*/WebClient.bundle/Contents/Resources/index.html' # Display variables for troubleshooting echo -e "Variables set:\\n\ 'TP_DOMAIN'=${TP_DOMAIN}\\n\ @@ -20,12 +21,17 @@ if [[ -z ${TP_THEME} ]]; then TP_THEME='organizr-dark' fi -# Adding stylesheets -if ! grep -q "${TP_DOMAIN}" /usr/lib/plexmediaserver/Resources/Plug-ins-*/WebClient.bundle/Contents/Resources/index.html; then +if [ "${TP_HOTIO}" = true ]; then + echo 'Changing to Hotio file paths!' + APP_FILEPATH='/app/usr/lib/plexmediaserver/Resources/Plug-ins-*/WebClient.bundle/Contents/Resources/index.html' +fi + +# Adding stylesheets +if ! grep -q "${TP_DOMAIN}" ${APP_FILEPATH}; then echo '---------------------------' echo '| Adding the stylesheet |' echo '---------------------------' - sed -i "s/<\/head>/<\/head> /g" /usr/lib/plexmediaserver/Resources/Plug-ins-*/WebClient.bundle/Contents/Resources/index.html + sed -i "s/<\/head>/<\/head> /g" ${APP_FILEPATH} printf 'Stylesheet set to %s\n' "${TP_THEME} " fi \ No newline at end of file diff --git a/qbittorrent/Dockerfile b/qbittorrent/Dockerfile index d20e1a04..9e8b27cb 100644 --- a/qbittorrent/Dockerfile +++ b/qbittorrent/Dockerfile @@ -1,7 +1,7 @@ FROM scratch - LABEL maintainer="GilbN" - +LABEL maintainer="GilbN" +LABEL app="Qbittorrent" # copy local files. COPY root/ / \ No newline at end of file diff --git a/radarr/Dockerfile b/radarr/Dockerfile index c02206ef..3fe87210 100644 --- a/radarr/Dockerfile +++ b/radarr/Dockerfile @@ -1,6 +1,7 @@ FROM scratch LABEL maintainer="GilbN" + LABEL app="Radarr" # copy local files. COPY root/ / \ No newline at end of file diff --git a/radarr/root/etc/cont-init.d/98-themepark b/radarr/root/etc/cont-init.d/98-themepark index 6a62b6b7..77a21b7c 100644 --- a/radarr/root/etc/cont-init.d/98-themepark +++ b/radarr/root/etc/cont-init.d/98-themepark @@ -4,9 +4,11 @@ echo '---------------------------' echo '| Radarr theme.park Mod |' echo '---------------------------' +APP_FILEPATH='/app/radarr/bin/UI/index.html' # Display variables for troubleshooting echo -e "Variables set:\\n\ 'TP_DOMAIN'=${TP_DOMAIN}\\n\ +'TP_ADDON'=${TP_ADDON}\\n\ 'TP_THEME'=${TP_THEME}\\n" # Set default @@ -20,15 +22,20 @@ if [[ -z ${TP_THEME} ]]; then TP_THEME='organizr-dark' fi +if [ "${TP_HOTIO}" = true ]; then + echo 'Changing to Hotio file paths!' + APP_FILEPATH='/app/bin/UI/index.html' +fi + # Adding stylesheets -if ! grep -q "${TP_DOMAIN}" /app/radarr/bin/UI/index.html; then +if ! grep -q "${TP_DOMAIN}" ${APP_FILEPATH}; then echo '---------------------------' echo '| Adding the stylesheet |' echo '---------------------------' - sed -i "s/<\/head>/<\/head> /g" /app/radarr/bin/UI/index.html + sed -i "s/<\/head>/<\/head> /g" ${APP_FILEPATH} printf 'Stylesheet set to %s\n' "${TP_THEME}" if [[ -n ${TP_ADDON} ]]; then - sed -i "s/<\/head>/<\/head> /g" /app/radarr/bin/UI/index.html - printf 'Added custom addon: %s\n\n' "${TP_ADDON}" + sed -i "s/<\/head>/<\/head> /g" ${APP_FILEPATH} + printf 'Added custom addon: %s\n\n' "${TP_ADDON}" fi fi \ No newline at end of file diff --git a/sonarr/Dockerfile b/sonarr/Dockerfile index c02206ef..e34ffdc9 100644 --- a/sonarr/Dockerfile +++ b/sonarr/Dockerfile @@ -1,6 +1,7 @@ FROM scratch - LABEL maintainer="GilbN" +LABEL maintainer="GilbN" +LABEL app="Sonarr" # copy local files. COPY root/ / \ No newline at end of file diff --git a/sonarr/root/etc/cont-init.d/98-themepark b/sonarr/root/etc/cont-init.d/98-themepark index 283227b9..af49afb4 100644 --- a/sonarr/root/etc/cont-init.d/98-themepark +++ b/sonarr/root/etc/cont-init.d/98-themepark @@ -4,9 +4,11 @@ echo '---------------------------' echo '| Sonarr theme.park Mod |' echo '---------------------------' -# Display variables for troubleshooting +APP_FILEPATH='/app/sonarr/bin/UI/index.html' +# Display variables for troubleshooting echo -e "Variables set:\\n\ 'TP_DOMAIN'=${TP_DOMAIN}\\n\ +'TP_ADDON'=${TP_ADDON}\\n\ 'TP_THEME'=${TP_THEME}\\n" # Set default @@ -20,15 +22,20 @@ if [[ -z ${TP_THEME} ]]; then TP_THEME='organizr-dark' fi +if [ "${TP_HOTIO}" = true ]; then + echo 'Changing to Hotio file paths!' + APP_FILEPATH='/app/bin/UI/index.html' +fi + # Adding stylesheets -if ! grep -q "${TP_DOMAIN}" /app/sonarr/bin/UI/index.html; then +if ! grep -q "${TP_DOMAIN}" ${APP_FILEPATH}; then echo '---------------------------' echo '| Adding the stylesheet |' echo '---------------------------' - sed -i "s/<\/head>/<\/head> /g" /app/sonarr/bin/UI/index.html + sed -i "s/<\/head>/<\/head> /g" ${APP_FILEPATH} printf 'Stylesheet set to %s\n' "${TP_THEME}" if [[ -n ${TP_ADDON} ]]; then - sed -i "s/<\/head>/<\/head> /g" /app/sonarr/bin/UI/index.html + sed -i "s/<\/head>/<\/head> /g" ${APP_FILEPATH} printf 'Added custom addon: %s\n\n' "${TP_ADDON}" fi fi \ No newline at end of file