From 2b2bd97b2c937526e9f299556200fe849e22b808 Mon Sep 17 00:00:00 2001 From: GilbN Date: Sun, 1 Aug 2021 15:18:08 +0000 Subject: [PATCH] deploy: 4dcd369b5fd8f484cf4d3b84eceeb106adb485e8 --- docker-mods/bazarr/Dockerfile | 6 + .../bazarr/root/etc/cont-init.d/98-themepark | 48 +++++++ docker-mods/calibre-web/Dockerfile | 6 + .../root/etc/cont-init.d/98-themepark | 38 ++++++ docker-mods/deluge/Dockerfile | 6 + .../deluge/root/etc/cont-init.d/98-themepark | 38 ++++++ docker-mods/emby/Dockerfile | 6 + .../emby/root/etc/cont-init.d/98-themepark | 38 ++++++ docker-mods/jackett/Dockerfile | 6 + .../jackett/root/etc/cont-init.d/98-themepark | 44 +++++++ docker-mods/jellyfin/Dockerfile | 6 + .../root/etc/cont-init.d/98-themepark | 38 ++++++ docker-mods/lazylibrarian/Dockerfile | 6 + .../root/etc/cont-init.d/98-themepark | 38 ++++++ docker-mods/librespeed/Dockerfile | 6 + .../root/etc/cont-init.d/98-themepark | 38 ++++++ docker-mods/lidarr/Dockerfile | 6 + .../lidarr/root/etc/cont-init.d/98-themepark | 46 +++++++ docker-mods/nzbget/Dockerfile | 6 + .../nzbget/root/etc/cont-init.d/98-themepark | 42 +++++++ docker-mods/plex/Dockerfile | 6 + .../plex/root/etc/cont-init.d/98-themepark | 43 +++++++ docker-mods/prowlarr/Dockerfile | 7 ++ .../root/etc/cont-init.d/98-themepark | 51 ++++++++ docker-mods/qbittorrent/Dockerfile | 7 ++ .../root/etc/cont-init.d/98-themepark | 116 +++++++++++++++++ docker-mods/radarr/Dockerfile | 7 ++ .../radarr/root/etc/cont-init.d/98-themepark | 51 ++++++++ docker-mods/readarr/Dockerfile | 6 + .../readarr/root/etc/cont-init.d/98-themepark | 50 ++++++++ docker-mods/rutorrent/Dockerfile | 6 + .../root/etc/cont-init.d/98-themepark | 38 ++++++ docker-mods/sabnzbd/Dockerfile | 6 + .../sabnzbd/root/etc/cont-init.d/98-themepark | 46 +++++++ docker-mods/sonarr/Dockerfile | 7 ++ .../sonarr/root/etc/cont-init.d/98-themepark | 51 ++++++++ docker-mods/synclounge/Dockerfile | 6 + .../root/etc/cont-init.d/98-themepark | 38 ++++++ docker-mods/tautulli/Dockerfile | 6 + .../root/etc/cont-init.d/98-themepark | 43 +++++++ docker-mods/thelounge/Dockerfile | 6 + .../root/etc/cont-init.d/98-themepark | 38 ++++++ docker-mods/transmission/Dockerfile | 6 + .../root/etc/cont-init.d/98-themepark | 38 ++++++ docker-mods/vuetorrent/Dockerfile | 7 ++ .../root/etc/cont-init.d/98-themepark | 118 ++++++++++++++++++ 46 files changed, 1272 insertions(+) create mode 100644 docker-mods/bazarr/Dockerfile create mode 100644 docker-mods/bazarr/root/etc/cont-init.d/98-themepark create mode 100644 docker-mods/calibre-web/Dockerfile create mode 100644 docker-mods/calibre-web/root/etc/cont-init.d/98-themepark create mode 100644 docker-mods/deluge/Dockerfile create mode 100644 docker-mods/deluge/root/etc/cont-init.d/98-themepark create mode 100644 docker-mods/emby/Dockerfile create mode 100644 docker-mods/emby/root/etc/cont-init.d/98-themepark create mode 100644 docker-mods/jackett/Dockerfile create mode 100644 docker-mods/jackett/root/etc/cont-init.d/98-themepark create mode 100644 docker-mods/jellyfin/Dockerfile create mode 100644 docker-mods/jellyfin/root/etc/cont-init.d/98-themepark create mode 100644 docker-mods/lazylibrarian/Dockerfile create mode 100644 docker-mods/lazylibrarian/root/etc/cont-init.d/98-themepark create mode 100644 docker-mods/librespeed/Dockerfile create mode 100644 docker-mods/librespeed/root/etc/cont-init.d/98-themepark create mode 100644 docker-mods/lidarr/Dockerfile create mode 100644 docker-mods/lidarr/root/etc/cont-init.d/98-themepark create mode 100644 docker-mods/nzbget/Dockerfile create mode 100644 docker-mods/nzbget/root/etc/cont-init.d/98-themepark create mode 100644 docker-mods/plex/Dockerfile create mode 100644 docker-mods/plex/root/etc/cont-init.d/98-themepark create mode 100644 docker-mods/prowlarr/Dockerfile create mode 100644 docker-mods/prowlarr/root/etc/cont-init.d/98-themepark create mode 100644 docker-mods/qbittorrent/Dockerfile create mode 100644 docker-mods/qbittorrent/root/etc/cont-init.d/98-themepark create mode 100644 docker-mods/radarr/Dockerfile create mode 100644 docker-mods/radarr/root/etc/cont-init.d/98-themepark create mode 100644 docker-mods/readarr/Dockerfile create mode 100644 docker-mods/readarr/root/etc/cont-init.d/98-themepark create mode 100644 docker-mods/rutorrent/Dockerfile create mode 100644 docker-mods/rutorrent/root/etc/cont-init.d/98-themepark create mode 100644 docker-mods/sabnzbd/Dockerfile create mode 100644 docker-mods/sabnzbd/root/etc/cont-init.d/98-themepark create mode 100644 docker-mods/sonarr/Dockerfile create mode 100644 docker-mods/sonarr/root/etc/cont-init.d/98-themepark create mode 100644 docker-mods/synclounge/Dockerfile create mode 100644 docker-mods/synclounge/root/etc/cont-init.d/98-themepark create mode 100644 docker-mods/tautulli/Dockerfile create mode 100644 docker-mods/tautulli/root/etc/cont-init.d/98-themepark create mode 100644 docker-mods/thelounge/Dockerfile create mode 100644 docker-mods/thelounge/root/etc/cont-init.d/98-themepark create mode 100644 docker-mods/transmission/Dockerfile create mode 100644 docker-mods/transmission/root/etc/cont-init.d/98-themepark create mode 100644 docker-mods/vuetorrent/Dockerfile create mode 100644 docker-mods/vuetorrent/root/etc/cont-init.d/98-themepark diff --git a/docker-mods/bazarr/Dockerfile b/docker-mods/bazarr/Dockerfile new file mode 100644 index 00000000..5b9f2340 --- /dev/null +++ b/docker-mods/bazarr/Dockerfile @@ -0,0 +1,6 @@ +FROM scratch + +LABEL maintainer="GilbN" +LABEL app="Bazarr" +#copy local files. +COPY root/ / diff --git a/docker-mods/bazarr/root/etc/cont-init.d/98-themepark b/docker-mods/bazarr/root/etc/cont-init.d/98-themepark new file mode 100644 index 00000000..0999180d --- /dev/null +++ b/docker-mods/bazarr/root/etc/cont-init.d/98-themepark @@ -0,0 +1,48 @@ +#!/usr/bin/with-contenv bash + +echo '---------------------------' +echo '| Bazarr theme.park Mod |' +echo '---------------------------' + +# Display variables for troubleshooting +echo -e "Variables set:\\n\ +'TP_DOMAIN'=${TP_DOMAIN}\\n\ +'TP_ADDON'=${TP_ADDON}\\n\ +'TP_THEME'=${TP_THEME}\\n" + +APP_FILEPATH='/app/bazarr/bin/frontend/build/index.html' +if [ "${TP_HOTIO}" = true ]; then + echo 'Changing to Hotio file path!' + APP_FILEPATH='/app/bin/frontend/build/index.html' +fi + +# Set default +if [[ -z ${TP_DOMAIN} ]]; then + echo 'No domain set, defaulting to theme-park.dev' + TP_DOMAIN='theme-park.dev' +fi + +case ${TP_DOMAIN} in + *"github.io"*) + echo "Switching to github.io URL style" + TP_DOMAIN="${TP_DOMAIN}\/theme.park" + ;; +esac + +if [[ -z ${TP_THEME} ]]; then + echo 'No theme set, defaulting to organizr-dark' + TP_THEME='organizr-dark' +fi + +# Adding stylesheets +if ! grep -q "${TP_DOMAIN}" "${APP_FILEPATH}"; then + echo '---------------------------' + echo '| Adding the stylesheet |' + echo '---------------------------' + 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_FILEPATH}" + printf 'Added custom addon: %s\n\n' "${TP_ADDON}" + fi +fi diff --git a/docker-mods/calibre-web/Dockerfile b/docker-mods/calibre-web/Dockerfile new file mode 100644 index 00000000..7eb23cad --- /dev/null +++ b/docker-mods/calibre-web/Dockerfile @@ -0,0 +1,6 @@ +FROM scratch + +LABEL maintainer="GilbN" +LABEL app="Calibre-Web" +#copy local files. +COPY root/ / diff --git a/docker-mods/calibre-web/root/etc/cont-init.d/98-themepark b/docker-mods/calibre-web/root/etc/cont-init.d/98-themepark new file mode 100644 index 00000000..e85979c9 --- /dev/null +++ b/docker-mods/calibre-web/root/etc/cont-init.d/98-themepark @@ -0,0 +1,38 @@ +#!/usr/bin/with-contenv bash + +echo '--------------------------------' +echo '| Calibre-web 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 [[ -z ${TP_DOMAIN} ]]; then + echo 'No domain set, defaulting to theme-park.dev' + TP_DOMAIN='theme-park.dev' +fi + +case ${TP_DOMAIN} in + *"github.io"*) + echo "Switching to github.io URL style" + TP_DOMAIN="${TP_DOMAIN}\/theme.park" + ;; +esac + +if [[ -z ${TP_THEME} ]]; then + echo 'No theme set, defaulting to organizr-dark' + TP_THEME='organizr-dark' +fi + +# Adding stylesheets +if ! grep -q "${TP_DOMAIN}" /app/calibre-web/cps/templates/layout.html; then + echo '---------------------------' + echo '| Adding the stylesheet |' + echo '---------------------------' + sed -i "s/<\/head>/<\/head> /g" /app/calibre-web/cps/templates/layout.html + printf 'Stylesheet set to %s\n' "${TP_THEME} + " +fi diff --git a/docker-mods/deluge/Dockerfile b/docker-mods/deluge/Dockerfile new file mode 100644 index 00000000..0660554f --- /dev/null +++ b/docker-mods/deluge/Dockerfile @@ -0,0 +1,6 @@ +FROM scratch + +LABEL maintainer="GilbN" +LABEL app="Deluge" +#copy local files. +COPY root/ / \ No newline at end of file diff --git a/docker-mods/deluge/root/etc/cont-init.d/98-themepark b/docker-mods/deluge/root/etc/cont-init.d/98-themepark new file mode 100644 index 00000000..5087a383 --- /dev/null +++ b/docker-mods/deluge/root/etc/cont-init.d/98-themepark @@ -0,0 +1,38 @@ +#!/usr/bin/with-contenv bash + +echo '---------------------------' +echo '| Deluge 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 [[ -z ${TP_DOMAIN} ]]; then + echo 'No domain set, defaulting to theme-park.dev' + TP_DOMAIN='theme-park.dev' +fi + +case ${TP_DOMAIN} in + *"github.io"*) + echo "Switching to github.io URL style" + TP_DOMAIN="${TP_DOMAIN}\/theme.park" + ;; +esac + +if [[ -z ${TP_THEME} ]]; then + echo 'No theme set, defaulting to organizr-dark' + TP_THEME='organizr-dark' +fi + +# Adding stylesheets +if ! grep -q "${TP_DOMAIN}" /usr/lib/python3/dist-packages/deluge/ui/web/index.html; then + echo '---------------------------' + echo '| Adding the stylesheet |' + echo '---------------------------' + sed -i "s/<\/head>/<\/head> /g" /usr/lib/python3/dist-packages/deluge/ui/web/index.html + printf 'Stylesheet set to %s\n' "${TP_THEME} + " +fi \ No newline at end of file diff --git a/docker-mods/emby/Dockerfile b/docker-mods/emby/Dockerfile new file mode 100644 index 00000000..c7ef48c2 --- /dev/null +++ b/docker-mods/emby/Dockerfile @@ -0,0 +1,6 @@ +FROM scratch + +LABEL maintainer="GilbN" +LABEL app="Emby" +#copy local files. +COPY root/ / \ No newline at end of file diff --git a/docker-mods/emby/root/etc/cont-init.d/98-themepark b/docker-mods/emby/root/etc/cont-init.d/98-themepark new file mode 100644 index 00000000..826e88d4 --- /dev/null +++ b/docker-mods/emby/root/etc/cont-init.d/98-themepark @@ -0,0 +1,38 @@ +#!/usr/bin/with-contenv bash + +echo '-------------------------' +echo '| Emby 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 [[ -z ${TP_DOMAIN} ]]; then + echo 'No domain set, defaulting to theme-park.dev' + TP_DOMAIN='theme-park.dev' +fi + +case ${TP_DOMAIN} in + *"github.io"*) + echo "Switching to github.io URL style" + TP_DOMAIN="${TP_DOMAIN}\/theme.park" + ;; +esac + +if [[ -z ${TP_THEME} ]]; then + echo 'No theme set, defaulting to organizr-dark' + TP_THEME='organizr-dark' +fi + +# Adding stylesheets +if ! grep -q "${TP_DOMAIN}" /app/emby/dashboard-ui/index.html; then + echo '---------------------------' + echo '| Adding the stylesheet |' + echo '---------------------------' + sed -i "s/<\/body>/<\/body> /g" /app/emby/dashboard-ui/index.html + printf 'Stylesheet set to %s\n' "${TP_THEME} + " +fi diff --git a/docker-mods/jackett/Dockerfile b/docker-mods/jackett/Dockerfile new file mode 100644 index 00000000..6266087b --- /dev/null +++ b/docker-mods/jackett/Dockerfile @@ -0,0 +1,6 @@ +FROM scratch + +LABEL maintainer="GilbN" +LABEL app="Jackett" +#copy local files. +COPY root/ / \ No newline at end of file diff --git a/docker-mods/jackett/root/etc/cont-init.d/98-themepark b/docker-mods/jackett/root/etc/cont-init.d/98-themepark new file mode 100644 index 00000000..d193e6c3 --- /dev/null +++ b/docker-mods/jackett/root/etc/cont-init.d/98-themepark @@ -0,0 +1,44 @@ +#!/usr/bin/with-contenv bash + +echo '---------------------------' +echo '| Jackett theme.park Mod |' +echo '---------------------------' + +# Display variables for troubleshooting +echo -e "Variables set:\\n\ +'TP_DOMAIN'=${TP_DOMAIN}\\n\ +'TP_THEME'=${TP_THEME}\\n" + +APP_FILEPATH='/app/Jackett/Content/index.html' +if [ "${TP_HOTIO}" = true ]; then + echo 'Changing to Hotio file path!' + APP_FILEPATH='/app/Content/index.html' +fi + +# Set default +if [[ -z ${TP_DOMAIN} ]]; then + echo 'No domain set, defaulting to theme-park.dev' + TP_DOMAIN='theme-park.dev' +fi + +case ${TP_DOMAIN} in + *"github.io"*) + echo "Switching to github.io URL style" + TP_DOMAIN="${TP_DOMAIN}\/theme.park" + ;; +esac + +if [[ -z ${TP_THEME} ]]; then + echo 'No theme set, defaulting to organizr-dark' + TP_THEME='organizr-dark' +fi + +# Adding stylesheets +if ! grep -q "${TP_DOMAIN}" "${APP_FILEPATH}"; then + echo '---------------------------' + echo '| Adding the stylesheet |' + echo '---------------------------' + 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/docker-mods/jellyfin/Dockerfile b/docker-mods/jellyfin/Dockerfile new file mode 100644 index 00000000..4e9e16d2 --- /dev/null +++ b/docker-mods/jellyfin/Dockerfile @@ -0,0 +1,6 @@ +FROM scratch + +LABEL maintainer="GilbN" +LABEL app="Jellyfin" +#copy local files. +COPY root/ / \ No newline at end of file diff --git a/docker-mods/jellyfin/root/etc/cont-init.d/98-themepark b/docker-mods/jellyfin/root/etc/cont-init.d/98-themepark new file mode 100644 index 00000000..9f4ced9b --- /dev/null +++ b/docker-mods/jellyfin/root/etc/cont-init.d/98-themepark @@ -0,0 +1,38 @@ +#!/usr/bin/with-contenv bash + +echo '-----------------------------' +echo '| Jellyfin 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 [[ -z ${TP_DOMAIN} ]]; then + echo 'No domain set, defaulting to theme-park.dev' + TP_DOMAIN='theme-park.dev' +fi + +case ${TP_DOMAIN} in + *"github.io"*) + echo "Switching to github.io URL style" + TP_DOMAIN="${TP_DOMAIN}\/theme.park" + ;; +esac + +if [[ -z ${TP_THEME} ]]; then + echo 'No theme set, defaulting to organizr-dark' + TP_THEME='organizr-dark' +fi + +# Adding stylesheets +if ! grep -q "${TP_DOMAIN}" /usr/share/jellyfin/web/index.html; then + echo '---------------------------' + echo '| Adding the stylesheet |' + echo '---------------------------' + sed -i "s/<\/head>/<\/head> /g" /usr/share/jellyfin/web/index.html + printf 'Stylesheet set to %s\n' "${TP_THEME} + " +fi \ No newline at end of file diff --git a/docker-mods/lazylibrarian/Dockerfile b/docker-mods/lazylibrarian/Dockerfile new file mode 100644 index 00000000..279c50e6 --- /dev/null +++ b/docker-mods/lazylibrarian/Dockerfile @@ -0,0 +1,6 @@ +FROM scratch + +LABEL maintainer="GilbN" +LABEL app="Lazylibrarian" +#copy local files. +COPY root/ / \ No newline at end of file diff --git a/docker-mods/lazylibrarian/root/etc/cont-init.d/98-themepark b/docker-mods/lazylibrarian/root/etc/cont-init.d/98-themepark new file mode 100644 index 00000000..fbb252f9 --- /dev/null +++ b/docker-mods/lazylibrarian/root/etc/cont-init.d/98-themepark @@ -0,0 +1,38 @@ +#!/usr/bin/with-contenv bash + +echo '----------------------------------' +echo '| Lazylibrarian 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 [[ -z ${TP_DOMAIN} ]]; then + echo 'No domain set, defaulting to theme-park.dev' + TP_DOMAIN='theme-park.dev' +fi + +case ${TP_DOMAIN} in + *"github.io"*) + echo "Switching to github.io URL style" + TP_DOMAIN="${TP_DOMAIN}\/theme.park" + ;; +esac + +if [[ -z ${TP_THEME} ]]; then + echo 'No theme set, defaulting to organizr-dark' + TP_THEME='organizr-dark' +fi + +# Adding stylesheets +if ! grep -q "${TP_DOMAIN}" /app/lazylibrarian/data/interfaces/bookstrap/base.html; then + echo '---------------------------' + echo '| Adding the stylesheet |' + echo '---------------------------' + sed -i "s/<\/head>/<\/head> /g" /app/lazylibrarian/data/interfaces/bookstrap/base.html + printf 'Stylesheet set to %s\n' "${TP_THEME} + " +fi \ No newline at end of file diff --git a/docker-mods/librespeed/Dockerfile b/docker-mods/librespeed/Dockerfile new file mode 100644 index 00000000..71ad6955 --- /dev/null +++ b/docker-mods/librespeed/Dockerfile @@ -0,0 +1,6 @@ +FROM scratch + +LABEL maintainer="GilbN" +LABEL app="Librespeed" +#copy local files. +COPY root/ / \ No newline at end of file diff --git a/docker-mods/librespeed/root/etc/cont-init.d/98-themepark b/docker-mods/librespeed/root/etc/cont-init.d/98-themepark new file mode 100644 index 00000000..2b8cc04a --- /dev/null +++ b/docker-mods/librespeed/root/etc/cont-init.d/98-themepark @@ -0,0 +1,38 @@ +#!/usr/bin/with-contenv bash + +echo '-------------------------------' +echo '| Librespeed 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 [[ -z ${TP_DOMAIN} ]]; then + echo 'No domain set, defaulting to theme-park.dev' + TP_DOMAIN='theme-park.dev' +fi + +case ${TP_DOMAIN} in + *"github.io"*) + echo "Switching to github.io URL style" + TP_DOMAIN="${TP_DOMAIN}\/theme.park" + ;; +esac + +if [[ -z ${TP_THEME} ]]; then + echo 'No theme set, defaulting to organizr-dark' + TP_THEME='organizr-dark' +fi + +# Adding stylesheets +if ! grep -q "${TP_DOMAIN}" /usr/share/webapps/librespeed/index.html; then + echo '---------------------------' + echo '| Adding the stylesheet |' + echo '---------------------------' + sed -i "s/<\/head>/<\/head> /g" /usr/share/webapps/librespeed/index.html + printf 'Stylesheet set to %s\n' "${TP_THEME} + " +fi \ No newline at end of file diff --git a/docker-mods/lidarr/Dockerfile b/docker-mods/lidarr/Dockerfile new file mode 100644 index 00000000..ba048736 --- /dev/null +++ b/docker-mods/lidarr/Dockerfile @@ -0,0 +1,6 @@ +FROM scratch + +LABEL maintainer="GilbN" +LABEL app="Lidarr" +#copy local files. +COPY root/ / \ No newline at end of file diff --git a/docker-mods/lidarr/root/etc/cont-init.d/98-themepark b/docker-mods/lidarr/root/etc/cont-init.d/98-themepark new file mode 100644 index 00000000..9d5d7bd5 --- /dev/null +++ b/docker-mods/lidarr/root/etc/cont-init.d/98-themepark @@ -0,0 +1,46 @@ +#!/usr/bin/with-contenv bash + +echo '---------------------------' +echo '| Lidarr theme.park Mod |' +echo '---------------------------' + +# Display variables for troubleshooting +echo -e "Variables set:\\n\ +'TP_DOMAIN'=${TP_DOMAIN}\\n\ +'TP_THEME'=${TP_THEME}\\n" + +APP_FILEPATH='/app/lidarr/bin/UI/index.html' +LOGIN_FILEPATH='/app/lidarr/bin/UI/login.html' +if [ "${TP_HOTIO}" = true ]; then + echo 'Changing to Hotio file path!' + APP_FILEPATH='/app/bin/UI/index.html' + LOGIN_FILEPATH='/app/bin/UI/login.html' +fi + +# Set default +if [[ -z ${TP_DOMAIN} ]]; then + echo 'No domain set, defaulting to theme-park.dev' + TP_DOMAIN='theme-park.dev' +fi + +case ${TP_DOMAIN} in + *"github.io"*) + echo "Switching to github.io URL style" + TP_DOMAIN="${TP_DOMAIN}\/theme.park" + ;; +esac + +if [[ -z ${TP_THEME} ]]; then + echo 'No theme set, defaulting to organizr-dark' + TP_THEME='organizr-dark' +fi + +# Adding stylesheets +if ! grep -q "${TP_DOMAIN}" "${APP_FILEPATH}"; then + echo '---------------------------' + echo '| Adding the stylesheet |' + echo '---------------------------' + sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}" + sed -i "s/<\/head>/<\/head> /g" "${LOGIN_FILEPATH}" + printf 'Stylesheet set to %s\n' "${TP_THEME}" +fi \ No newline at end of file diff --git a/docker-mods/nzbget/Dockerfile b/docker-mods/nzbget/Dockerfile new file mode 100644 index 00000000..dbfbcb47 --- /dev/null +++ b/docker-mods/nzbget/Dockerfile @@ -0,0 +1,6 @@ +FROM scratch + +LABEL maintainer="GilbN" +LABEL app="NZBGet" +#copy local files. +COPY root/ / \ No newline at end of file diff --git a/docker-mods/nzbget/root/etc/cont-init.d/98-themepark b/docker-mods/nzbget/root/etc/cont-init.d/98-themepark new file mode 100644 index 00000000..79daa5e4 --- /dev/null +++ b/docker-mods/nzbget/root/etc/cont-init.d/98-themepark @@ -0,0 +1,42 @@ +#!/usr/bin/with-contenv bash + +echo '---------------------------' +echo '| NZBGet theme.park Mod |' +echo '---------------------------' + +# Display variables for troubleshooting +echo -e "Variables set:\\n\ +'TP_DOMAIN'=${TP_DOMAIN}\\n\ +'TP_THEME'=${TP_THEME}\\n" + +APP_FILEPATH='/app/nzbget/webui/index.html' +if [ "${TP_HOTIO}" = true ]; then + echo 'Changing to Hotio file path!' + APP_FILEPATH='/app/webui/index.html' +fi +# Set default +if [[ -z ${TP_DOMAIN} ]]; then + echo 'No domain set, defaulting to theme-park.dev' + TP_DOMAIN='theme-park.dev' +fi + +case ${TP_DOMAIN} in + *"github.io"*) + echo "Switching to github.io URL style" + TP_DOMAIN="${TP_DOMAIN}\/theme.park" + ;; +esac + +if [[ -z ${TP_THEME} ]]; then + echo 'No theme set, defaulting to organizr-dark' + TP_THEME='organizr-dark' +fi + +# Adding stylesheets +if ! grep -q "${TP_DOMAIN}" "${APP_FILEPATH}"; then + echo '---------------------------' + echo '| Adding the stylesheet |' + echo '---------------------------' + 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/docker-mods/plex/Dockerfile b/docker-mods/plex/Dockerfile new file mode 100644 index 00000000..8f787f32 --- /dev/null +++ b/docker-mods/plex/Dockerfile @@ -0,0 +1,6 @@ +FROM scratch + +LABEL maintainer="GilbN" +LABEL app="Plex" +#copy local files. +COPY root/ / diff --git a/docker-mods/plex/root/etc/cont-init.d/98-themepark b/docker-mods/plex/root/etc/cont-init.d/98-themepark new file mode 100644 index 00000000..69dc5e7c --- /dev/null +++ b/docker-mods/plex/root/etc/cont-init.d/98-themepark @@ -0,0 +1,43 @@ +#!/usr/bin/with-contenv bash + +echo '-------------------------' +echo '| Plex theme.park Mod |' +echo '-------------------------' + +# Display variables for troubleshooting +echo -e "Variables set:\\n\ +'TP_DOMAIN'=${TP_DOMAIN}\\n\ +'TP_THEME'=${TP_THEME}\\n" + +APP_FILEPATH='' +if [ "${TP_HOTIO}" = true ]; then + echo 'Changing to Hotio file path!' + APP_FILEPATH='/app' +fi + +# Set default +if [[ -z ${TP_DOMAIN} ]]; then + echo 'No domain set, defaulting to theme-park.dev' + TP_DOMAIN='theme-park.dev' +fi + +case ${TP_DOMAIN} in + *"github.io"*) + echo "Switching to github.io URL style" + TP_DOMAIN="${TP_DOMAIN}\/theme.park" + ;; +esac + +if [[ -z ${TP_THEME} ]]; then + echo 'No theme set, defaulting to organizr-dark' + TP_THEME='organizr-dark' +fi + +# Adding stylesheets +if ! grep -q "${TP_DOMAIN}" "${APP_FILEPATH}"; then + echo '---------------------------' + echo '| Adding the stylesheet |' + echo '---------------------------' + sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}"/usr/lib/plexmediaserver/Resources/Plug-ins-*/WebClient.bundle/Contents/Resources/index.html + printf 'Stylesheet set to %s\n' "${TP_THEME}" +fi \ No newline at end of file diff --git a/docker-mods/prowlarr/Dockerfile b/docker-mods/prowlarr/Dockerfile new file mode 100644 index 00000000..a66c908c --- /dev/null +++ b/docker-mods/prowlarr/Dockerfile @@ -0,0 +1,7 @@ +FROM scratch + + LABEL maintainer="GilbN" + LABEL app="Prowlarr" + +#copy local files. +COPY root/ / \ No newline at end of file diff --git a/docker-mods/prowlarr/root/etc/cont-init.d/98-themepark b/docker-mods/prowlarr/root/etc/cont-init.d/98-themepark new file mode 100644 index 00000000..b88167f5 --- /dev/null +++ b/docker-mods/prowlarr/root/etc/cont-init.d/98-themepark @@ -0,0 +1,51 @@ +#!/usr/bin/with-contenv bash + +echo '---------------------------' +echo '| Prowlarr theme.park Mod |' +echo '---------------------------' + +# Display variables for troubleshooting +echo -e "Variables set:\\n\ +'TP_DOMAIN'=${TP_DOMAIN}\\n\ +'TP_ADDON'=${TP_ADDON}\\n\ +'TP_THEME'=${TP_THEME}\\n" + +APP_FILEPATH='/app/prowlarr/bin/UI/index.html' +LOGIN_FILEPATH='/app/prowlarr/bin/UI/login.html' +if [ "${TP_HOTIO}" = true ]; then + echo 'Changing to Hotio file path!' + APP_FILEPATH='/app/bin/UI/index.html' + LOGIN_FILEPATH='/app/bin/UI/login.html' +fi + +# Set default +if [[ -z ${TP_DOMAIN} ]]; then + echo 'No domain set, defaulting to theme-park.dev' + TP_DOMAIN='theme-park.dev' +fi + +case ${TP_DOMAIN} in + *"github.io"*) + echo "Switching to github.io URL style" + TP_DOMAIN="${TP_DOMAIN}\/theme.park" + ;; +esac + +if [[ -z ${TP_THEME} ]]; then + echo 'No theme set, defaulting to organizr-dark' + TP_THEME='organizr-dark' +fi + +# Adding stylesheets +if ! grep -q "${TP_DOMAIN}" "${APP_FILEPATH}"; then + echo '---------------------------' + echo '| Adding the stylesheet |' + echo '---------------------------' + sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}" + sed -i "s/<\/head>/<\/head> /g" "${LOGIN_FILEPATH}" + printf 'Stylesheet set to %s\n' "${TP_THEME}" + if [[ -n ${TP_ADDON} ]]; then + 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/docker-mods/qbittorrent/Dockerfile b/docker-mods/qbittorrent/Dockerfile new file mode 100644 index 00000000..e65aa179 --- /dev/null +++ b/docker-mods/qbittorrent/Dockerfile @@ -0,0 +1,7 @@ +FROM scratch + + +LABEL maintainer="GilbN" +LABEL app="Qbittorrent" +#copy local files. +COPY root/ / \ No newline at end of file diff --git a/docker-mods/qbittorrent/root/etc/cont-init.d/98-themepark b/docker-mods/qbittorrent/root/etc/cont-init.d/98-themepark new file mode 100644 index 00000000..4c89ce61 --- /dev/null +++ b/docker-mods/qbittorrent/root/etc/cont-init.d/98-themepark @@ -0,0 +1,116 @@ +#!/usr/bin/with-contenv bash + +echo '------------------------------' +echo '| qBittorrent theme.park Mod |' +echo '------------------------------' + +APP_FILEPATH='/config/qBittorrent/qBittorrent.conf' +if [ "${TP_HOTIO}" = true ]; then + echo 'Changing to Hotio file path!' + APP_FILEPATH='/config/config/qBittorrent.conf' +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 + +if ! [[ -x "$(command -v svn)" ]]; then +echo '--------------------------' +echo '| Installing svn package |' +echo '--------------------------' + apt-get update && \ + apt-get install -y subversion +fi + +# Display variables for troubleshooting +echo -e "Variables set:\\n\ +'APP_FILEPATH'=${APP_FILEPATH}\\n\ +'TP_DISABLE_THEME'=${TP_DISABLE_THEME}\\n\ +'TP_HOTIO'=${TP_HOTIO}\\n\ +'TP_DOMAIN'=${TP_DOMAIN}\\n\ +'TP_THEME'=${TP_THEME}\\n" + +# Set default +if [[ -z ${TP_DOMAIN} ]]; then + echo 'No domain set, defaulting to theme-park.dev' + TP_DOMAIN='theme-park.dev' +fi + +case ${TP_DOMAIN} in + *"github.io"*) + echo "Switching to github.io URL style" + TP_DOMAIN="${TP_DOMAIN}\/theme.park" + ;; +esac + +if [[ -z ${TP_THEME} ]]; then + echo 'No theme set, defaulting to organizr-dark' + TP_THEME='organizr-dark' +fi + +# Downloading fresh webui files from source. +if [[ ! -d /themepark ]]; then + echo '---------------------------------------' + echo '| Downloading WebUI files from github |' + echo '---------------------------------------' + printf '\nDownloading qBittorrent webui to "/themepark"..please wait\n' + svn export --quiet https://github.com/qbittorrent/qBittorrent/trunk/src/webui/www /themepark + printf '\nDownload finished\n\n' + printf '\nDownloading qBittorrent webui icons to "/themepark/xxx"..please wait\n' + svn export --force --quiet https://github.com/qbittorrent/qBittorrent/trunk/src/icons /temp + cp -a /temp/. /themepark/public/icons + cp -a /temp/. /themepark/private/icons + rm -rf /temp + printf '\nDownload finished\n\n' +fi + +sed_file(){ + sed -i "s/<\/head>/<\/head> /g" $1 + printf 'Stylesheet set to %s on %s\n\n' "${TP_THEME}" "$1" +} + +# Adding stylesheets +echo '---------------------------------------' +echo '| Adding the stylesheet to html files |' +echo '---------------------------------------' +if ! grep -q "${TP_DOMAIN}" /themepark/public/index.html; then + sed_file /themepark/public/index.html +fi + +if ! grep -q "${TP_DOMAIN}" /themepark/private/index.html; then + find ./themepark/private -type f -iname *.html | while read fname + do + sed_file $fname + done +fi + +if ! grep -q "WebUI\\\RootFolder" "${APP_FILEPATH}"; then + echo '--------------------------------------' + echo '| Adding WebUI\RootFolder=/themepark |' + echo '--------------------------------------' + sed -i -e '$aWebUI\\RootFolder=/themepark' "${APP_FILEPATH}"; +fi + +if ! grep -q "WebUI\\\AlternativeUIEnabled" "${APP_FILEPATH}"; then + echo '------------------------------------------' + echo '| Adding WebUI\AlternativeUIEnabled=true |' + echo '------------------------------------------' + sed -i -e '$aWebUI\\AlternativeUIEnabled=true' "${APP_FILEPATH}"; +fi + +if ! grep -q "WebUI\\\RootFolder=/themepark" "${APP_FILEPATH}" || ! grep -q "WebUI\\\AlternativeUIEnabled=true" "${APP_FILEPATH}"; then + echo '-------------------------------------------------------' + echo '| Updating RootFolder and AlternativeUIEnabled values |' + echo '-------------------------------------------------------' + sed -i "s/WebUI\\\AlternativeUIEnabled=.*$/WebUI\\\AlternativeUIEnabled=true/g" "${APP_FILEPATH}"; + sed -i "s/WebUI\\\RootFolder=.*$/WebUI\\\RootFolder=\/themepark/g" "${APP_FILEPATH}"; +fi diff --git a/docker-mods/radarr/Dockerfile b/docker-mods/radarr/Dockerfile new file mode 100644 index 00000000..4cf8f536 --- /dev/null +++ b/docker-mods/radarr/Dockerfile @@ -0,0 +1,7 @@ +FROM scratch + + LABEL maintainer="GilbN" + LABEL app="Radarr" + +#copy local files. +COPY root/ / \ No newline at end of file diff --git a/docker-mods/radarr/root/etc/cont-init.d/98-themepark b/docker-mods/radarr/root/etc/cont-init.d/98-themepark new file mode 100644 index 00000000..5ba1fa28 --- /dev/null +++ b/docker-mods/radarr/root/etc/cont-init.d/98-themepark @@ -0,0 +1,51 @@ +#!/usr/bin/with-contenv bash + +echo '---------------------------' +echo '| Radarr theme.park Mod |' +echo '---------------------------' + +# Display variables for troubleshooting +echo -e "Variables set:\\n\ +'TP_DOMAIN'=${TP_DOMAIN}\\n\ +'TP_ADDON'=${TP_ADDON}\\n\ +'TP_THEME'=${TP_THEME}\\n" + +APP_FILEPATH='/app/radarr/bin/UI/index.html' +LOGIN_FILEPATH='/app/radarr/bin/UI/login.html' +if [ "${TP_HOTIO}" = true ]; then + echo 'Changing to Hotio file path!' + APP_FILEPATH='/app/bin/UI/index.html' + LOGIN_FILEPATH='/app/bin/UI/login.html' +fi + +# Set default +if [[ -z ${TP_DOMAIN} ]]; then + echo 'No domain set, defaulting to theme-park.dev' + TP_DOMAIN='theme-park.dev' +fi + +case ${TP_DOMAIN} in + *"github.io"*) + echo "Switching to github.io URL style" + TP_DOMAIN="${TP_DOMAIN}\/theme.park" + ;; +esac + +if [[ -z ${TP_THEME} ]]; then + echo 'No theme set, defaulting to organizr-dark' + TP_THEME='organizr-dark' +fi + +# Adding stylesheets +if ! grep -q "${TP_DOMAIN}" "${APP_FILEPATH}"; then + echo '---------------------------' + echo '| Adding the stylesheet |' + echo '---------------------------' + sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}" + sed -i "s/<\/head>/<\/head> /g" "${LOGIN_FILEPATH}" + printf 'Stylesheet set to %s\n' "${TP_THEME}" + if [[ -n ${TP_ADDON} ]]; then + 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/docker-mods/readarr/Dockerfile b/docker-mods/readarr/Dockerfile new file mode 100644 index 00000000..da2c273f --- /dev/null +++ b/docker-mods/readarr/Dockerfile @@ -0,0 +1,6 @@ +FROM scratch + + LABEL maintainer="GilbN" + LABEL app="Readarr" +#copy local files. +COPY root/ / \ No newline at end of file diff --git a/docker-mods/readarr/root/etc/cont-init.d/98-themepark b/docker-mods/readarr/root/etc/cont-init.d/98-themepark new file mode 100644 index 00000000..8790bf05 --- /dev/null +++ b/docker-mods/readarr/root/etc/cont-init.d/98-themepark @@ -0,0 +1,50 @@ +#!/usr/bin/with-contenv bash + +echo '---------------------------' +echo '| Readarr theme.park Mod |' +echo '---------------------------' + +# Display variables for troubleshooting +echo -e "Variables set:\\n\ +'TP_DOMAIN'=${TP_DOMAIN}\\n\ +'TP_THEME'=${TP_THEME}\\n" + +APP_FILEPATH='/app/readarr/bin/UI/index.html' +LOGIN_FILEPATH='/app/readarr/bin/UI/login.html' +if [ "${TP_HOTIO}" = true ]; then + echo 'Changing to Hotio file path!' + APP_FILEPATH='/app/bin/UI/index.html' + LOGIN_FILEPATH='/app/bin/UI/login.html' +fi + +# Set default +if [[ -z ${TP_DOMAIN} ]]; then + echo 'No domain set, defaulting to theme-park.dev' + TP_DOMAIN='theme-park.dev' +fi + +case ${TP_DOMAIN} in + *"github.io"*) + echo "Switching to github.io URL style" + TP_DOMAIN="${TP_DOMAIN}\/theme.park" + ;; +esac + +if [[ -z ${TP_THEME} ]]; then + echo 'No theme set, defaulting to organizr-dark' + TP_THEME='organizr-dark' +fi + +# Adding stylesheets +if ! grep -q "${TP_DOMAIN}" "${APP_FILEPATH}"; then + echo '---------------------------' + echo '| Adding the stylesheet |' + echo '---------------------------' + sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}" + sed -i "s/<\/head>/<\/head> /g" "${LOGIN_FILEPATH}" + printf 'Stylesheet set to %s\n' "${TP_THEME}" + if [[ -n ${TP_ADDON} ]]; then + sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}" + printf 'Added custom addon: %s\n\n' "${TP_ADDON}" + fi +fi diff --git a/docker-mods/rutorrent/Dockerfile b/docker-mods/rutorrent/Dockerfile new file mode 100644 index 00000000..7c8cad78 --- /dev/null +++ b/docker-mods/rutorrent/Dockerfile @@ -0,0 +1,6 @@ +FROM scratch + +LABEL maintainer="GilbN" +LABEL app="Rutorrent" +#copy local files. +COPY root/ / \ No newline at end of file diff --git a/docker-mods/rutorrent/root/etc/cont-init.d/98-themepark b/docker-mods/rutorrent/root/etc/cont-init.d/98-themepark new file mode 100644 index 00000000..6b4e6cc5 --- /dev/null +++ b/docker-mods/rutorrent/root/etc/cont-init.d/98-themepark @@ -0,0 +1,38 @@ +#!/usr/bin/with-contenv bash + +echo '------------------------------' +echo '| Rutorrent 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 [[ -z ${TP_DOMAIN} ]]; then + echo 'No domain set, defaulting to theme-park.dev' + TP_DOMAIN='theme-park.dev' +fi + +case ${TP_DOMAIN} in + *"github.io"*) + echo "Switching to github.io URL style" + TP_DOMAIN="${TP_DOMAIN}\/theme.park" + ;; +esac + +if [[ -z ${TP_THEME} ]]; then + echo 'No theme set, defaulting to organizr-dark' + TP_THEME='organizr-dark' +fi + +# Adding stylesheets +if ! grep -q "${TP_DOMAIN}" /app/rutorrent/index.html; then + echo '---------------------------' + echo '| Adding the stylesheet |' + echo '---------------------------' + sed -i "s/<\/head>/<\/head> /g" /app/rutorrent/index.html + printf 'Stylesheet set to %s\n' "${TP_THEME} + " +fi \ No newline at end of file diff --git a/docker-mods/sabnzbd/Dockerfile b/docker-mods/sabnzbd/Dockerfile new file mode 100644 index 00000000..2db1860c --- /dev/null +++ b/docker-mods/sabnzbd/Dockerfile @@ -0,0 +1,6 @@ +FROM scratch + +LABEL maintainer="GilbN" +LABEL app="SABnzbd" +#copy local files. +COPY root/ / \ No newline at end of file diff --git a/docker-mods/sabnzbd/root/etc/cont-init.d/98-themepark b/docker-mods/sabnzbd/root/etc/cont-init.d/98-themepark new file mode 100644 index 00000000..0d34a522 --- /dev/null +++ b/docker-mods/sabnzbd/root/etc/cont-init.d/98-themepark @@ -0,0 +1,46 @@ +#!/usr/bin/with-contenv bash + +echo '----------------------------' +echo '| SABnzbd theme.park Mod |' +echo '----------------------------' + +# Display variables for troubleshooting +echo -e "Variables set:\\n\ +'TP_DOMAIN'=${TP_DOMAIN}\\n\ +'TP_THEME'=${TP_THEME}\\n" + +APP_FILEPATH='/app/sabnzbd' +if [ "${TP_HOTIO}" = true ]; then + echo 'Changing to Hotio file path!' + APP_FILEPATH='/app' +fi + +# Set default +if [[ -z ${TP_DOMAIN} ]]; then + echo 'No domain set, defaulting to theme-park.dev' + TP_DOMAIN='theme-park.dev' +fi + +case ${TP_DOMAIN} in + *"github.io"*) + echo "Switching to github.io URL style" + TP_DOMAIN="${TP_DOMAIN}\/theme.park" + ;; +esac + +if [[ -z ${TP_THEME} ]]; then + echo 'No theme set, defaulting to organizr-dark' + TP_THEME='organizr-dark' +fi + +# Adding stylesheets +if ! grep -q "${TP_DOMAIN}" "${APP_FILEPATH}/interfaces/Glitter/templates/main.tmpl"; then + echo '---------------------------' + echo '| Adding the stylesheet |' + echo '---------------------------' + sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}/interfaces/Glitter/templates/main.tmpl" + sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}/interfaces/Config/templates/_inc_header_uc.tmpl" + sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}/interfaces/Config/templates/login/main.tmpl" + sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}/interfaces/wizard/inc_top.tmpl" + printf 'Stylesheet set to %s\n' "${TP_THEME}" +fi \ No newline at end of file diff --git a/docker-mods/sonarr/Dockerfile b/docker-mods/sonarr/Dockerfile new file mode 100644 index 00000000..77b59e36 --- /dev/null +++ b/docker-mods/sonarr/Dockerfile @@ -0,0 +1,7 @@ +FROM scratch + +LABEL maintainer="GilbN" +LABEL app="Sonarr" + +#copy local files. +COPY root/ / \ No newline at end of file diff --git a/docker-mods/sonarr/root/etc/cont-init.d/98-themepark b/docker-mods/sonarr/root/etc/cont-init.d/98-themepark new file mode 100644 index 00000000..f97b5a3d --- /dev/null +++ b/docker-mods/sonarr/root/etc/cont-init.d/98-themepark @@ -0,0 +1,51 @@ +#!/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_ADDON'=${TP_ADDON}\\n\ +'TP_THEME'=${TP_THEME}\\n" + +APP_FILEPATH='/app/sonarr/bin/UI/index.html' +LOGIN_FILEPATH='/app/sonarr/bin/UI/login.html' +if [ "${TP_HOTIO}" = true ]; then + echo 'Changing to Hotio file path!' + APP_FILEPATH='/app/bin/UI/index.html' + LOGIN_FILEPATH='/app/bin/UI/login.html' +fi + +# Set default +if [[ -z ${TP_DOMAIN} ]]; then + echo 'No domain set, defaulting to theme-park.dev' + TP_DOMAIN='theme-park.dev' +fi + +case ${TP_DOMAIN} in + *"github.io"*) + echo "Switching to github.io URL style" + TP_DOMAIN="${TP_DOMAIN}\/theme.park" + ;; +esac + +if [[ -z ${TP_THEME} ]]; then + echo 'No theme set, defaulting to organizr-dark' + TP_THEME='organizr-dark' +fi + +# Adding stylesheets +if ! grep -q "${TP_DOMAIN}" "${APP_FILEPATH}"; then + echo '---------------------------' + echo '| Adding the stylesheet |' + echo '---------------------------' + sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}" + sed -i "s/<\/head>/<\/head> /g" "${LOGIN_FILEPATH}" + printf 'Stylesheet set to %s\n' "${TP_THEME}" + if [[ -n ${TP_ADDON} ]]; then + 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/docker-mods/synclounge/Dockerfile b/docker-mods/synclounge/Dockerfile new file mode 100644 index 00000000..dc7ed341 --- /dev/null +++ b/docker-mods/synclounge/Dockerfile @@ -0,0 +1,6 @@ +FROM scratch + +LABEL maintainer="GilbN" +LABEL app="Synclounge" +#copy local files. +COPY root/ / \ No newline at end of file diff --git a/docker-mods/synclounge/root/etc/cont-init.d/98-themepark b/docker-mods/synclounge/root/etc/cont-init.d/98-themepark new file mode 100644 index 00000000..c0188308 --- /dev/null +++ b/docker-mods/synclounge/root/etc/cont-init.d/98-themepark @@ -0,0 +1,38 @@ +#!/usr/bin/with-contenv bash + +echo '-------------------------------' +echo '| Synclounge 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 [[ -z ${TP_DOMAIN} ]]; then + echo 'No domain set, defaulting to theme-park.dev' + TP_DOMAIN='theme-park.dev' +fi + +case ${TP_DOMAIN} in + *"github.io"*) + echo "Switching to github.io URL style" + TP_DOMAIN="${TP_DOMAIN}\/theme.park" + ;; +esac + +if [[ -z ${TP_THEME} ]]; then + echo 'No theme set, defaulting to organizr-dark' + TP_THEME='organizr-dark' +fi + +# Adding stylesheets +if ! grep -q "${TP_DOMAIN}" /usr/lib/node_modules/synclounge/dist/index.html; then + echo '---------------------------' + echo '| Adding the stylesheet |' + echo '---------------------------' + sed -i "s/<\/head>/<\/head> /g" /usr/lib/node_modules/synclounge/dist/index.html + printf 'Stylesheet set to %s\n' "${TP_THEME} + " +fi \ No newline at end of file diff --git a/docker-mods/tautulli/Dockerfile b/docker-mods/tautulli/Dockerfile new file mode 100644 index 00000000..d6d6f560 --- /dev/null +++ b/docker-mods/tautulli/Dockerfile @@ -0,0 +1,6 @@ +FROM scratch + +LABEL maintainer="GilbN" +LABEL app="Tautulli" +#copy local files. +COPY root/ / \ No newline at end of file diff --git a/docker-mods/tautulli/root/etc/cont-init.d/98-themepark b/docker-mods/tautulli/root/etc/cont-init.d/98-themepark new file mode 100644 index 00000000..08beb1c6 --- /dev/null +++ b/docker-mods/tautulli/root/etc/cont-init.d/98-themepark @@ -0,0 +1,43 @@ +#!/usr/bin/with-contenv bash + +echo '-----------------------------' +echo '| Tautulli theme.park Mod |' +echo '-----------------------------' + +# Display variables for troubleshooting +echo -e "Variables set:\\n\ +'TP_DOMAIN'=${TP_DOMAIN}\\n\ +'TP_THEME'=${TP_THEME}\\n" + +APP_FILEPATH='/app/tautulli/data/interfaces/default/base.html' +if [ "${TP_HOTIO}" = true ]; then + echo 'Changing to Hotio file path!' + APP_FILEPATH='/app/data/interfaces/default/base.html' +fi + +# Set default +if [[ -z ${TP_DOMAIN} ]]; then + echo 'No domain set, defaulting to theme-park.dev' + TP_DOMAIN='theme-park.dev' +fi + +case ${TP_DOMAIN} in + *"github.io"*) + echo "Switching to github.io URL style" + TP_DOMAIN="${TP_DOMAIN}\/theme.park" + ;; +esac + +if [[ -z ${TP_THEME} ]]; then + echo 'No theme set, defaulting to organizr-dark' + TP_THEME='organizr-dark' +fi + +# Adding stylesheets +if ! grep -q "${TP_DOMAIN}" "${APP_FILEPATH}"; then + echo '---------------------------' + echo '| Adding the stylesheet |' + echo '---------------------------' + 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/docker-mods/thelounge/Dockerfile b/docker-mods/thelounge/Dockerfile new file mode 100644 index 00000000..c112091b --- /dev/null +++ b/docker-mods/thelounge/Dockerfile @@ -0,0 +1,6 @@ +FROM scratch + +LABEL maintainer="GilbN" +LABEL app="The Lounge" +#copy local files. +COPY root/ / \ No newline at end of file diff --git a/docker-mods/thelounge/root/etc/cont-init.d/98-themepark b/docker-mods/thelounge/root/etc/cont-init.d/98-themepark new file mode 100644 index 00000000..2c181036 --- /dev/null +++ b/docker-mods/thelounge/root/etc/cont-init.d/98-themepark @@ -0,0 +1,38 @@ +#!/usr/bin/with-contenv bash + +echo '-------------------------------' +echo '| The Lounge 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 [[ -z ${TP_DOMAIN} ]]; then + echo 'No domain set, defaulting to theme-park.dev' + TP_DOMAIN='theme-park.dev' +fi + +case ${TP_DOMAIN} in + *"github.io"*) + echo "Switching to github.io URL style" + TP_DOMAIN="${TP_DOMAIN}\/theme.park" + ;; +esac + +if [[ -z ${TP_THEME} ]]; then + echo 'No theme set, defaulting to organizr-dark' + TP_THEME='organizr-dark' +fi + +# Adding stylesheets +if ! grep -q "${TP_DOMAIN}" /usr/lib/node_modules/thelounge/client/index.html.tpl; then + echo '---------------------------' + echo '| Adding the stylesheet |' + echo '---------------------------' + sed -i "s/<\/head>/<\/head> /g" /usr/lib/node_modules/thelounge/client/index.html.tpl + printf 'Stylesheet set to %s\n' "${TP_THEME} + " +fi \ No newline at end of file diff --git a/docker-mods/transmission/Dockerfile b/docker-mods/transmission/Dockerfile new file mode 100644 index 00000000..175cc581 --- /dev/null +++ b/docker-mods/transmission/Dockerfile @@ -0,0 +1,6 @@ +FROM scratch + +LABEL maintainer="GilbN" +LABEL app="Transmission" +#copy local files. +COPY root/ / \ No newline at end of file diff --git a/docker-mods/transmission/root/etc/cont-init.d/98-themepark b/docker-mods/transmission/root/etc/cont-init.d/98-themepark new file mode 100644 index 00000000..189cbce6 --- /dev/null +++ b/docker-mods/transmission/root/etc/cont-init.d/98-themepark @@ -0,0 +1,38 @@ +#!/usr/bin/with-contenv bash + +echo '---------------------------------' +echo '| Transmission 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 [[ -z ${TP_DOMAIN} ]]; then + echo 'No domain set, defaulting to theme-park.dev' + TP_DOMAIN='theme-park.dev' +fi + +case ${TP_DOMAIN} in + *"github.io"*) + echo "Switching to github.io URL style" + TP_DOMAIN="${TP_DOMAIN}\/theme.park" + ;; +esac + +if [[ -z ${TP_THEME} ]]; then + echo 'No theme set, defaulting to organizr-dark' + TP_THEME='organizr-dark' +fi + +# Adding stylesheets +if ! grep -q "${TP_DOMAIN}" /usr/share/transmission/web/index.html; then + echo '---------------------------' + echo '| Adding the stylesheet |' + echo '---------------------------' + sed -i "s/<\/head>/<\/head> /g" /usr/share/transmission/web/index.html + printf 'Stylesheet set to %s\n' "${TP_THEME} + " +fi \ No newline at end of file diff --git a/docker-mods/vuetorrent/Dockerfile b/docker-mods/vuetorrent/Dockerfile new file mode 100644 index 00000000..32b48e23 --- /dev/null +++ b/docker-mods/vuetorrent/Dockerfile @@ -0,0 +1,7 @@ +FROM scratch + + +LABEL maintainer="GilbN" +LABEL app="VueTorrent" +#copy local files. +COPY root/ / \ No newline at end of file diff --git a/docker-mods/vuetorrent/root/etc/cont-init.d/98-themepark b/docker-mods/vuetorrent/root/etc/cont-init.d/98-themepark new file mode 100644 index 00000000..ee3c30de --- /dev/null +++ b/docker-mods/vuetorrent/root/etc/cont-init.d/98-themepark @@ -0,0 +1,118 @@ +#!/usr/bin/with-contenv bash +APP_FILEPATH='/config/qBittorrent/qBittorrent.conf' +INDEX_FILEPATH='/vuetorrent/public/index.html' +if [ "${TP_HOTIO}" = true ]; then + echo 'Changing to Hotio file paths!' + APP_FILEPATH='/config/config/qBittorrent.conf' + INDEX_FILEPATH='/app/vuetorrent/public/index.html' +fi +# Display variables for troubleshooting +echo -e "Variables set:\\n\ +'TP_DOMAIN'=${TP_DOMAIN}\\n\ +'TP_THEME'=${TP_THEME}\\n" + +# Set default +if [[ -z ${TP_DOMAIN} ]]; then + echo 'No domain set, defaulting to theme-park.dev' + TP_DOMAIN='theme-park.dev' +fi + +case ${TP_DOMAIN} in + *"github.io"*) + echo "Switching to github.io URL style" + TP_DOMAIN="${TP_DOMAIN}\/theme.park" + ;; +esac + +if [[ -z ${TP_THEME} ]]; then + echo 'No theme set, defaulting to organizr-dark' + TP_THEME='organizr-dark' +fi +RELEASE_FILEPATH='/vuetorrent/release.json' +NEEDS_UPDATE=false +CURRENT_RELEASE=$(curl -s https://api.github.com/repos/WDaan/VueTorrent/releases/latest | jq -r ".assets[]") + +# =============================================== +install_deps() { + if ! [[ -x "$(command -v jq)" ]]; then + echo '-------------------------' + echo '| Installing jq package |' + echo '-------------------------' + apt-get update && + apt-get install -y jq + fi +} +check_updates() { + if [[ ! -d ./vuetorrent ]]; then + NEEDS_UPDATE=true + elif [[ ! -f $RELEASE_FILEPATH ]]; then + NEEDS_UPDATE=true + else + old_date=$(date -d $(cat "${RELEASE_FILEPATH}" | jq -r ".updated_at") +%s) + new_date=$(date -d $(echo $CURRENT_RELEASE | jq -r ".updated_at") +%s) + if [ $new_date -gt $old_date ]; then + NEEDS_UPDATE=true + fi + fi +} +update_ui() { + printf '\nDownloading qBittorrent webui to "/vuetorrent"..please wait\n' + curl -L $(echo $CURRENT_RELEASE | jq -r ".browser_download_url") --output /tmp/vuetorrent.zip + printf '\nDownload finished\n\n' + if [[ -d /vuetorrent ]]; then + rm -rf /vuetorrent + fi + # mkdir -p /vuetorrent + unzip -q /tmp/vuetorrent.zip -d / + echo $CURRENT_RELEASE >"${RELEASE_FILEPATH}" +} +# =============================================== + +echo '-----------------------------------------' +echo '| qBittorrent vuetorrent theme.park Mod |' +echo '-----------------------------------------' + +if [[ -z ${TP_HOTIO} ]]; then + install_deps + check_updates + + if [ "$NEEDS_UPDATE" = true ]; then + echo '---------------------------------------' + echo '| Downloading WebUI files from github |' + echo '---------------------------------------' + update_ui + else + echo ' WebUI files are up-to-date!' + fi + + if ! grep -q "WebUI\\\RootFolder" "${APP_FILEPATH}"; then + echo '--------------------------------------' + echo '| Adding WebUI\RootFolder=/vuetorrent |' + echo '--------------------------------------' + sed -i -e '$aWebUI\\RootFolder=/vuetorrent' "${APP_FILEPATH}" + fi + + if ! grep -q "WebUI\\\AlternativeUIEnabled" "${APP_FILEPATH}"; then + echo '------------------------------------------' + echo '| Adding WebUI\AlternativeUIEnabled=true |' + echo '------------------------------------------' + sed -i -e '$aWebUI\\AlternativeUIEnabled=true' "${APP_FILEPATH}" + fi + + if ! grep -q "WebUI\\\RootFolder=/vuetorrent" "${APP_FILEPATH}" || ! grep -q "WebUI\\\AlternativeUIEnabled=true" "${APP_FILEPATH}"; then + echo '-------------------------------------------------------' + echo '| Updating RootFolder and AlternativeUIEnabled values |' + echo '-------------------------------------------------------' + sed -i "s/WebUI\\\AlternativeUIEnabled=.*$/WebUI\\\AlternativeUIEnabled=true/g" "${APP_FILEPATH}" + sed -i "s/WebUI\\\RootFolder=.*$/WebUI\\\RootFolder=\/vuetorrent/g" "${APP_FILEPATH}" + fi +fi + +# Adding stylesheets +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}" + printf 'Stylesheet set to %s on public index.html\n' "${TP_THEME}" +fi \ No newline at end of file