From 3503e4722372d435201a84842b8f53d94bae535f Mon Sep 17 00:00:00 2001 From: GilbN Date: Wed, 17 Apr 2024 18:53:07 +0200 Subject: [PATCH] Update plex script for hotio path --- .../plex/root/etc/cont-init.d/98-themepark | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) 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 c3675e08..d440853c 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