Browse Source

more hotio container paths

pull/240/head
gilbN 4 years ago
parent
commit
609841f8f3
  1. 4
      bazarr/Dockerfile
  2. 13
      bazarr/root/etc/cont-init.d/98-themepark
  3. 4
      jackett/Dockerfile
  4. 10
      jackett/root/etc/cont-init.d/98-themepark
  5. 4
      jellyfin/Dockerfile
  6. 4
      lidarr/Dockerfile
  7. 13
      lidarr/root/etc/cont-init.d/98-themepark
  8. 18
      nzbget/root/etc/cont-init.d/98-themepark
  9. 19
      plex/root/etc/cont-init.d/98-themepark
  10. 19
      qbittorrent/root/etc/cont-init.d/98-themepark
  11. 18
      radarr/root/etc/cont-init.d/98-themepark
  12. 10
      readarr/root/etc/cont-init.d/98-themepark
  13. 4
      sabnzbd/Dockerfile
  14. 19
      sabnzbd/root/etc/cont-init.d/98-themepark
  15. 18
      sonarr/root/etc/cont-init.d/98-themepark
  16. 4
      tautulli/Dockerfile
  17. 13
      tautulli/root/etc/cont-init.d/98-themepark

4
bazarr/Dockerfile

@ -1,6 +1,6 @@
FROM scratch
LABEL maintainer="GilbN"
LABEL maintainer="GilbN"
LABEL app="Bazarr"
# copy local files.
COPY root/ /

13
bazarr/root/etc/cont-init.d/98-themepark

@ -9,6 +9,12 @@ echo -e "Variables set:\\n\
'TP_DOMAIN'=${TP_DOMAIN}\\n\
'TP_THEME'=${TP_THEME}\\n"
APP_FILEPATH='/app/bazarr/bin/views/_main.html'
if [ "${TP_HOTIO}" = true ]; then
echo 'Changing to Hotio file path!'
APP_FILEPATH='/app/bin/views/_main.html'
fi
# Set default
if [[ -z ${TP_DOMAIN} ]]; then
echo 'No domain set, defaulting to gilbn.github.io'
@ -21,11 +27,10 @@ if [[ -z ${TP_THEME} ]]; then
fi
# Adding stylesheets
if ! grep -q "${TP_DOMAIN}" /app/bazarr/bin/views/_main.html; then
if ! grep -q "${TP_DOMAIN}" "${APP_FILEPATH}"; then
echo '---------------------------'
echo '| Adding the stylesheet |'
echo '---------------------------'
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/theme.park\/CSS\/themes\/bazarr\/${TP_THEME}.css'><\/head> /g" /app/bazarr/bin/views/_main.html
printf 'Stylesheet set to %s\n' "${TP_THEME}
"
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/theme.park\/CSS\/themes\/bazarr\/${TP_THEME}.css'><\/head> /g" "${APP_FILEPATH}"
printf 'Stylesheet set to %s\n' "${TP_THEME}"
fi

4
jackett/Dockerfile

@ -1,6 +1,6 @@
FROM scratch
LABEL maintainer="GilbN"
LABEL maintainer="GilbN"
LABEL app="Jackett"
# copy local files.
COPY root/ /

10
jackett/root/etc/cont-init.d/98-themepark

@ -9,6 +9,12 @@ 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 gilbn.github.io'
@ -21,11 +27,11 @@ if [[ -z ${TP_THEME} ]]; then
fi
# Adding stylesheets
if ! grep -q "${TP_DOMAIN}" /app/Jackett/Content/index.html; then
if ! grep -q "${TP_DOMAIN}" "${APP_FILEPATH}"; then
echo '---------------------------'
echo '| Adding the stylesheet |'
echo '---------------------------'
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/theme.park\/CSS\/themes\/jackett\/${TP_THEME}.css'><\/head> /g" /app/Jackett/Content/index.html
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/theme.park\/CSS\/themes\/jackett\/${TP_THEME}.css'><\/head> /g" "${APP_FILEPATH}"
printf 'Stylesheet set to %s\n' "${TP_THEME}
"
fi

4
jellyfin/Dockerfile

@ -1,6 +1,6 @@
FROM scratch
LABEL maintainer="GilbN"
LABEL maintainer="GilbN"
LABEL app="Jellyfin"
# copy local files.
COPY root/ /

4
lidarr/Dockerfile

@ -1,6 +1,6 @@
FROM scratch
LABEL maintainer="GilbN"
LABEL maintainer="GilbN"
LABEL app="Lidarr"
# copy local files.
COPY root/ /

13
lidarr/root/etc/cont-init.d/98-themepark

@ -9,6 +9,12 @@ echo -e "Variables set:\\n\
'TP_DOMAIN'=${TP_DOMAIN}\\n\
'TP_THEME'=${TP_THEME}\\n"
APP_FILEPATH='/app/lidarr/bin/UI/index.html'
if [ "${TP_HOTIO}" = true ]; then
echo 'Changing to Hotio file path!'
APP_FILEPATH='/app/bin/UI/index.html'
fi
# Set default
if [[ -z ${TP_DOMAIN} ]]; then
echo 'No domain set, defaulting to gilbn.github.io'
@ -21,11 +27,10 @@ if [[ -z ${TP_THEME} ]]; then
fi
# Adding stylesheets
if ! grep -q "${TP_DOMAIN}" /app/lidarr/bin/UI/index.html; then
if ! grep -q "${TP_DOMAIN}" "${APP_FILEPATH}"; then
echo '---------------------------'
echo '| Adding the stylesheet |'
echo '---------------------------'
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/theme.park\/CSS\/themes\/lidarr\/${TP_THEME}.css'><\/head> /g" /app/lidarr/bin/UI/index.html
printf 'Stylesheet set to %s\n' "${TP_THEME}
"
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/theme.park\/CSS\/themes\/lidarr\/${TP_THEME}.css'><\/head> /g" "${APP_FILEPATH}"
printf 'Stylesheet set to %s\n' "${TP_THEME}"
fi

18
nzbget/root/etc/cont-init.d/98-themepark

@ -4,12 +4,16 @@ 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\
'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 gilbn.github.io'
@ -21,17 +25,11 @@ 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_FILEPATH}; then
if ! grep -q "${TP_DOMAIN}" "${APP_FILEPATH}"; then
echo '---------------------------'
echo '| Adding the stylesheet |'
echo '---------------------------'
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/theme.park\/CSS\/themes\/nzbget\/${TP_THEME}.css'><\/head> /g" ${APP_FILEPATH}
printf 'Stylesheet set to %s\n' "${TP_THEME}
"
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/theme.park\/CSS\/themes\/nzbget\/${TP_THEME}.css'><\/head> /g" "${APP_FILEPATH}"
printf 'Stylesheet set to %s\n' "${TP_THEME}"
fi

19
plex/root/etc/cont-init.d/98-themepark

@ -4,12 +4,17 @@ 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\
'TP_THEME'=${TP_THEME}\\n"
APP_FILEPATH='/usr/lib/plexmediaserver/Resources/Plug-ins-*/WebClient.bundle/Contents/Resources/index.html'
if [ "${TP_HOTIO}" = true ]; then
echo 'Changing to Hotio file path!'
APP_FILEPATH='/app/usr/lib/plexmediaserver/Resources/Plug-ins-*/WebClient.bundle/Contents/Resources/index.html'
fi
# Set default
if [[ -z ${TP_DOMAIN} ]]; then
echo 'No domain set, defaulting to gilbn.github.io'
@ -21,17 +26,11 @@ if [[ -z ${TP_THEME} ]]; then
TP_THEME='organizr-dark'
fi
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
if ! grep -q "${TP_DOMAIN}" "${APP_FILEPATH}"; then
echo '---------------------------'
echo '| Adding the stylesheet |'
echo '---------------------------'
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/theme.park\/CSS\/themes\/plex\/${TP_THEME}.css'><\/head> /g" ${APP_FILEPATH}
printf 'Stylesheet set to %s\n' "${TP_THEME}
"
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/theme.park\/CSS\/themes\/plex\/${TP_THEME}.css'><\/head> /g" "${APP_FILEPATH}"
printf 'Stylesheet set to %s\n' "${TP_THEME}"
fi

19
qbittorrent/root/etc/cont-init.d/98-themepark

@ -4,6 +4,11 @@ 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/qBittorrent.conf'
fi
if ! [[ -x "$(command -v svn)" ]]; then
echo '--------------------------'
echo '| Installing svn package |'
@ -65,24 +70,24 @@ if ! grep -q "${TP_DOMAIN}" /themepark/private/index.html; then
printf 'Stylesheet set to %s on private download.html\n\n' "${TP_THEME}"
fi
if ! grep -q "WebUI\\\RootFolder" /config/qBittorrent/qBittorrent.conf; then
if ! grep -q "WebUI\\\RootFolder" "${APP_FILEPATH}"; then
echo '--------------------------------------'
echo '| Adding WebUI\RootFolder=/themepark |'
echo '--------------------------------------'
sed -i -e '$aWebUI\\RootFolder=/themepark' /config/qBittorrent/qBittorrent.conf;
sed -i -e '$aWebUI\\RootFolder=/themepark' "${APP_FILEPATH}";
fi
if ! grep -q "WebUI\\\AlternativeUIEnabled" /config/qBittorrent/qBittorrent.conf; then
if ! grep -q "WebUI\\\AlternativeUIEnabled" "${APP_FILEPATH}"; then
echo '------------------------------------------'
echo '| Adding WebUI\AlternativeUIEnabled=true |'
echo '------------------------------------------'
sed -i -e '$aWebUI\\AlternativeUIEnabled=true' /config/qBittorrent/qBittorrent.conf;
sed -i -e '$aWebUI\\AlternativeUIEnabled=true' "${APP_FILEPATH}";
fi
if ! grep -q "WebUI\\\RootFolder=/themepark" /config/qBittorrent/qBittorrent.conf || ! grep -q "WebUI\\\AlternativeUIEnabled=true" /config/qBittorrent/qBittorrent.conf; then
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" /config/qBittorrent/qBittorrent.conf;
sed -i "s/WebUI\\\RootFolder=.*$/WebUI\\\RootFolder=\/themepark/g" /config/qBittorrent/qBittorrent.conf;
sed -i "s/WebUI\\\AlternativeUIEnabled=.*$/WebUI\\\AlternativeUIEnabled=true/g" "${APP_FILEPATH}";
sed -i "s/WebUI\\\RootFolder=.*$/WebUI\\\RootFolder=\/themepark/g" "${APP_FILEPATH}";
fi

18
radarr/root/etc/cont-init.d/98-themepark

@ -4,13 +4,18 @@ 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"
APP_FILEPATH='/app/radarr/bin/UI/index.html'
if [ "${TP_HOTIO}" = true ]; then
echo 'Changing to Hotio file path!'
APP_FILEPATH='/app/bin/UI/index.html'
fi
# Set default
if [[ -z ${TP_DOMAIN} ]]; then
echo 'No domain set, defaulting to gilbn.github.io'
@ -22,20 +27,15 @@ 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_FILEPATH}; then
if ! grep -q "${TP_DOMAIN}" "${APP_FILEPATH}"; then
echo '---------------------------'
echo '| Adding the stylesheet |'
echo '---------------------------'
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/theme.park\/CSS\/themes\/radarr\/${TP_THEME}.css'><\/head> /g" ${APP_FILEPATH}
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/theme.park\/CSS\/themes\/radarr\/${TP_THEME}.css'><\/head> /g" "${APP_FILEPATH}"
printf 'Stylesheet set to %s\n' "${TP_THEME}"
if [[ -n ${TP_ADDON} ]]; then
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/theme.park\/CSS\/addons\/radarr\/${TP_ADDON}.css'><\/head> /g" ${APP_FILEPATH}
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/theme.park\/CSS\/addons\/radarr\/${TP_ADDON}.css'><\/head> /g" "${APP_FILEPATH}"
printf 'Added custom addon: %s\n\n' "${TP_ADDON}"
fi
fi

10
readarr/root/etc/cont-init.d/98-themepark

@ -9,6 +9,12 @@ echo -e "Variables set:\\n\
'TP_DOMAIN'=${TP_DOMAIN}\\n\
'TP_THEME'=${TP_THEME}\\n"
APP_FILEPATH='/app/readarr/bin/UI/index.html'
if [ "${TP_HOTIO}" = true ]; then
echo 'Changing to Hotio file path!'
APP_FILEPATH='/app/bin/UI/index.html'
fi
# Set default
if [[ -z ${TP_DOMAIN} ]]; then
echo 'No domain set, defaulting to gilbn.github.io'
@ -21,11 +27,11 @@ if [[ -z ${TP_THEME} ]]; then
fi
# Adding stylesheets
if ! grep -q "${TP_DOMAIN}" /app/bin/UI/index.html; then
if ! grep -q "${TP_DOMAIN}" "${APP_FILEPATH}"; then
echo '---------------------------'
echo '| Adding the stylesheet |'
echo '---------------------------'
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/theme.park\/CSS\/themes\/readarr\/${TP_THEME}.css'><\/head> /g" /app/bin/UI/index.html
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/theme.park\/CSS\/themes\/readarr\/${TP_THEME}.css'><\/head> /g" "${APP_FILEPATH}"
printf 'Stylesheet set to %s\n' "${TP_THEME}
"
fi

4
sabnzbd/Dockerfile

@ -1,6 +1,6 @@
FROM scratch
LABEL maintainer="GilbN"
LABEL maintainer="GilbN"
LABEL app="SABnzbd"
# copy local files.
COPY root/ /

19
sabnzbd/root/etc/cont-init.d/98-themepark

@ -9,6 +9,12 @@ 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 gilbn.github.io'
@ -21,14 +27,13 @@ if [[ -z ${TP_THEME} ]]; then
fi
# Adding stylesheets
if ! grep -q "${TP_DOMAIN}" /app/sabnzbd/interfaces/Glitter/templates/main.tmpl; then
if ! grep -q "${TP_DOMAIN}" "${APP_FILEPATH}/interfaces/Glitter/templates/main.tmpl"; then
echo '---------------------------'
echo '| Adding the stylesheet |'
echo '---------------------------'
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/theme.park\/CSS\/themes\/sabnzbd\/${TP_THEME}.css'><\/head> /g" /app/sabnzbd/interfaces/Glitter/templates/main.tmpl
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/theme.park\/CSS\/themes\/sabnzbd\/${TP_THEME}.css'><\/head> /g" /app/sabnzbd/interfaces/Config/templates/_inc_header_uc.tmpl
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/theme.park\/CSS\/themes\/sabnzbd\/${TP_THEME}.css'><\/head> /g" /app/sabnzbd/interfaces/Config/templates/login/main.tmpl
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/theme.park\/CSS\/themes\/sabnzbd\/${TP_THEME}.css'><\/head> /g" /app/sabnzbd/interfaces/wizard/inc_top.tmpl
printf 'Stylesheet set to %s\n' "${TP_THEME}
"
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/theme.park\/CSS\/themes\/sabnzbd\/${TP_THEME}.css'><\/head> /g" "${APP_FILEPATH}/interfaces/Glitter/templates/main.tmpl"
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/theme.park\/CSS\/themes\/sabnzbd\/${TP_THEME}.css'><\/head> /g" "${APP_FILEPATH}/interfaces/Config/templates/_inc_header_uc.tmpl"
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/theme.park\/CSS\/themes\/sabnzbd\/${TP_THEME}.css'><\/head> /g" "${APP_FILEPATH}/interfaces/Config/templates/login/main.tmpl"
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/theme.park\/CSS\/themes\/sabnzbd\/${TP_THEME}.css'><\/head> /g" "${APP_FILEPATH}/interfaces/wizard/inc_top.tmpl"
printf 'Stylesheet set to %s\n' "${TP_THEME}"
fi

18
sonarr/root/etc/cont-init.d/98-themepark

@ -4,13 +4,18 @@ echo '---------------------------'
echo '| Sonarr theme.park Mod |'
echo '---------------------------'
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"
APP_FILEPATH='/app/sonarr/bin/UI/index.html'
if [ "${TP_HOTIO}" = true ]; then
echo 'Changing to Hotio file path!'
APP_FILEPATH='/app/bin/UI/index.html'
fi
# Set default
if [[ -z ${TP_DOMAIN} ]]; then
echo 'No domain set, defaulting to gilbn.github.io'
@ -22,20 +27,15 @@ 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_FILEPATH}; then
if ! grep -q "${TP_DOMAIN}" "${APP_FILEPATH}"; 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_FILEPATH}
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/theme.park\/CSS\/themes\/sonarr\/${TP_THEME}.css'><\/head> /g" "${APP_FILEPATH}"
printf 'Stylesheet set to %s\n' "${TP_THEME}"
if [[ -n ${TP_ADDON} ]]; then
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/theme.park\/CSS\/addons\/sonarr\/${TP_ADDON}.css'><\/head> /g" ${APP_FILEPATH}
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/theme.park\/CSS\/addons\/sonarr\/${TP_ADDON}.css'><\/head> /g" "${APP_FILEPATH}"
printf 'Added custom addon: %s\n\n' "${TP_ADDON}"
fi
fi

4
tautulli/Dockerfile

@ -1,6 +1,6 @@
FROM scratch
LABEL maintainer="GilbN"
LABEL maintainer="GilbN"
LABEL app="Tautulli"
# copy local files.
COPY root/ /

13
tautulli/root/etc/cont-init.d/98-themepark

@ -9,6 +9,12 @@ 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 gilbn.github.io'
@ -21,11 +27,10 @@ if [[ -z ${TP_THEME} ]]; then
fi
# Adding stylesheets
if ! grep -q "${TP_DOMAIN}" /app/tautulli/data/interfaces/default/base.html; then
if ! grep -q "${TP_DOMAIN}" "${APP_FILEPATH}"; then
echo '---------------------------'
echo '| Adding the stylesheet |'
echo '---------------------------'
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/theme.park\/CSS\/themes\/tautulli\/${TP_THEME}.css'><\/head> /g" /app/tautulli/data/interfaces/default/base.html
printf 'Stylesheet set to %s\n' "${TP_THEME}
"
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/theme.park\/CSS\/themes\/tautulli\/${TP_THEME}.css'><\/head> /g" "${APP_FILEPATH}"
printf 'Stylesheet set to %s\n' "${TP_THEME}"
fi
Loading…
Cancel
Save