diff --git a/docker-mods/plex/root/etc/cont-init.d/98-themepark b/docker-mods/plex/root/etc/cont-init.d/98-themepark index c3675e08ac..d440853cb5 100755 --- a/docker-mods/plex/root/etc/cont-init.d/98-themepark +++ b/docker-mods/plex/root/etc/cont-init.d/98-themepark @@ -11,6 +11,11 @@ echo -e "Variables set:\\n\ 'TP_SCHEME'=${TP_SCHEME}\\n\ 'TP_THEME'=${TP_THEME}\\n" +if [[ "${TP_HOTIO}" = true ]]; then + echo 'Changing to Hotio file path!' + APP_FILEPATH='/app/bin' +fi + # Set default if [[ -z ${TP_DOMAIN} ]]; then echo 'No domain set, defaulting to theme-park.dev' @@ -38,17 +43,17 @@ if [[ -z ${TP_THEME} ]]; then TP_THEME='organizr' fi -# Adding stylesheets -if ! grep -q "${TP_DOMAIN}/css/base" /usr/lib/plexmediaserver/Resources/Plug-ins-*/WebClient.bundle/Contents/Resources/index.html; then +# Adding stylesheets +if ! grep -q "${TP_DOMAIN}/css/base" "${APP_FILEPATH}"/usr/lib/plexmediaserver/Resources/Plug-ins-*/WebClient.bundle/Contents/Resources/index.html; 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" /usr/lib/plexmediaserver/Resources/Plug-ins-*/WebClient.bundle/Contents/Resources/index.html + sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}"/usr/lib/plexmediaserver/Resources/Plug-ins-*/WebClient.bundle/Contents/Resources/index.html + 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}" if [[ -n ${TP_ADDON} ]]; then for addon in $(echo "$TP_ADDON" | tr "|" " "); do - 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}"/usr/lib/plexmediaserver/Resources/Plug-ins-*/WebClient.bundle/Contents/Resources/index.html printf 'Added custom addon: %s\n\n' "${addon}" done fi