diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index adeacc0d..737fb603 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -3,9 +3,20 @@ on: release: types: - released + workflow_dispatch: + inputs: + branch: + description: 'Select branch' + required: true + type: choice + options: + - master + - develop push: branches: - develop + paths-ignore: + - '.github/**' jobs: push_to_ghcr_io: runs-on: ubuntu-latest @@ -27,12 +38,12 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GH_PAT }} - name: build&push master - if: ${{ github.event.release.target_commitish == 'live' }} + if: ${{ github.event.release.target_commitish == 'master' || github.event.inputs.branch == 'master' }} run: | docker build --build-arg TP_RELEASE=${{ steps.get_version.outputs.VERSION }} --build-arg BUILD_DATE=${{ steps.date_time.outputs.NOW }} --tag ghcr.io/gilbn/theme.park --tag ghcr.io/gilbn/theme.park:${{ steps.get_version.outputs.VERSION }} . docker push --all-tags ghcr.io/gilbn/theme.park - name: build&push develop - if: ${{ github.ref == 'refs/heads/develop' }} + if: ${{ github.ref == 'refs/heads/develop' || github.event.inputs.branch == 'develop' }} run: | docker build --build-arg TP_RELEASE=${{ steps.get_version.outputs.VERSION }} --build-arg BUILD_DATE=${{ steps.date_time.outputs.NOW }} --tag ghcr.io/gilbn/theme.park:develop . docker push --all-tags ghcr.io/gilbn/theme.park @@ -55,12 +66,12 @@ jobs: username: ${{ secrets.DH_USER }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: build&push dh master - if: ${{ github.event.release.target_commitish == 'live' }} + if: ${{ github.event.release.target_commitish == 'master' || github.event.inputs.branch == 'master' }} run: | docker build --build-arg TP_RELEASE=${{ steps.get_version.outputs.VERSION }} --build-arg BUILD_DATE=${{ steps.date_time.outputs.NOW }} --tag gilbn/theme.park --tag gilbn/theme.park:${{ steps.get_version.outputs.VERSION }} . docker push --all-tags gilbn/theme.park - name: build&push dh develop - if: ${{ github.ref == 'refs/heads/develop' }} + if: ${{ github.ref == 'refs/heads/develop' || github.event.inputs.branch == 'develop' }} run: | docker build --build-arg TP_RELEASE=${{ steps.get_version.outputs.VERSION }} --build-arg BUILD_DATE=${{ steps.date_time.outputs.NOW }} --tag gilbn/theme.park:develop . docker push --all-tags gilbn/theme.park diff --git a/docker-mods/bazarr/root/etc/cont-init.d/98-themepark b/docker-mods/bazarr/root/etc/cont-init.d/98-themepark index 8d954e41..c3b07812 100644 --- a/docker-mods/bazarr/root/etc/cont-init.d/98-themepark +++ b/docker-mods/bazarr/root/etc/cont-init.d/98-themepark @@ -9,6 +9,7 @@ echo -e "Variables set:\\n\ 'TP_DOMAIN'=${TP_DOMAIN}\\n\ 'TP_ADDON'=${TP_ADDON}\\n\ 'TP_COMMUNITY_THEME'=${TP_COMMUNITY_THEME}\\n\ +'TP_SCHEME'=${TP_SCHEME}\\n\ 'TP_THEME'=${TP_THEME}\\n" APP_FILEPATH='/app/bazarr/bin/frontend/build/index.html' @@ -22,6 +23,10 @@ if [[ -z ${TP_DOMAIN} ]]; then echo 'No domain set, defaulting to theme-park.dev' TP_DOMAIN='theme-park.dev' fi +if [[ -z ${TP_SCHEME} ]]; then + echo 'No scheme set, defaulting to https' + TP_SCHEME='https' +fi THEME_TYPE='theme-options' if [ "${TP_COMMUNITY_THEME}" = true ]; then @@ -45,12 +50,12 @@ if ! grep -q "${TP_DOMAIN}/css/base" "${APP_FILEPATH}"; then echo '---------------------------' echo '| Adding the stylesheet |' echo '---------------------------' - sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}" - sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}" + sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}" + sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}" 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" "${APP_FILEPATH}" + sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}" printf 'Added custom addon: %s\n\n' "${addon}" done fi 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 index 01b64324..19b1417e 100644 --- a/docker-mods/calibre-web/root/etc/cont-init.d/98-themepark +++ b/docker-mods/calibre-web/root/etc/cont-init.d/98-themepark @@ -8,6 +8,7 @@ echo '--------------------------------' echo -e "Variables set:\\n\ 'TP_DOMAIN'=${TP_DOMAIN}\\n\ 'TP_COMMUNITY_THEME'=${TP_COMMUNITY_THEME}\\n\ +'TP_SCHEME'=${TP_SCHEME}\\n\ 'TP_THEME'=${TP_THEME}\\n" # Set default @@ -15,6 +16,10 @@ if [[ -z ${TP_DOMAIN} ]]; then echo 'No domain set, defaulting to theme-park.dev' TP_DOMAIN='theme-park.dev' fi +if [[ -z ${TP_SCHEME} ]]; then + echo 'No scheme set, defaulting to https' + TP_SCHEME='https' +fi THEME_TYPE='theme-options' if [ "${TP_COMMUNITY_THEME}" = true ]; then @@ -38,8 +43,8 @@ if ! grep -q "${TP_DOMAIN}/css/base" /app/calibre-web/cps/templates/layout.html; echo '---------------------------' echo '| Adding the stylesheet |' echo '---------------------------' - sed -i "s/<\/head>/<\/head> /g" /app/calibre-web/cps/templates/layout.html - sed -i "s/<\/head>/<\/head> /g" /app/calibre-web/cps/templates/layout.html + sed -i "s/<\/head>/<\/head> /g" /app/calibre-web/cps/templates/layout.html + 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/root/etc/cont-init.d/98-themepark b/docker-mods/deluge/root/etc/cont-init.d/98-themepark index 9bbd3ea8..1f8265c2 100644 --- a/docker-mods/deluge/root/etc/cont-init.d/98-themepark +++ b/docker-mods/deluge/root/etc/cont-init.d/98-themepark @@ -8,6 +8,7 @@ echo '---------------------------' echo -e "Variables set:\\n\ 'TP_DOMAIN'=${TP_DOMAIN}\\n\ 'TP_COMMUNITY_THEME'=${TP_COMMUNITY_THEME}\\n\ +'TP_SCHEME'=${TP_SCHEME}\\n\ 'TP_THEME'=${TP_THEME}\\n" # Set default @@ -15,6 +16,10 @@ if [[ -z ${TP_DOMAIN} ]]; then echo 'No domain set, defaulting to theme-park.dev' TP_DOMAIN='theme-park.dev' fi +if [[ -z ${TP_SCHEME} ]]; then + echo 'No scheme set, defaulting to https' + TP_SCHEME='https' +fi THEME_TYPE='theme-options' if [ "${TP_COMMUNITY_THEME}" = true ]; then @@ -39,8 +44,8 @@ if ! grep -q "${TP_DOMAIN}/css/base" ${DELUGE_INDEX_PATH}; then echo '---------------------------' echo '| Adding the stylesheet |' echo '---------------------------' - sed -i "s/<\/head>/<\/head> /g" ${DELUGE_INDEX_PATH} - sed -i "s/<\/head>/<\/head> /g" ${DELUGE_INDEX_PATH} + sed -i "s/<\/head>/<\/head> /g" ${DELUGE_INDEX_PATH} + sed -i "s/<\/head>/<\/head> /g" ${DELUGE_INDEX_PATH} printf 'Stylesheet set to %s\n' "${TP_THEME} " fi diff --git a/docker-mods/duplicati/root/etc/cont-init.d/98-themepark b/docker-mods/duplicati/root/etc/cont-init.d/98-themepark index 9a28300e..1c1fa3ed 100644 --- a/docker-mods/duplicati/root/etc/cont-init.d/98-themepark +++ b/docker-mods/duplicati/root/etc/cont-init.d/98-themepark @@ -11,6 +11,7 @@ echo -e "Variables set:\\n\ 'APP_FILEPATH'=${APP_FILEPATH}\\n\ 'TP_DOMAIN'=${TP_DOMAIN}\\n\ 'TP_COMMUNITY_THEME'=${TP_COMMUNITY_THEME}\\n\ +'TP_SCHEME'=${TP_SCHEME}\\n\ 'TP_THEME'=${TP_THEME}\\n" # Set default @@ -18,6 +19,10 @@ if [[ -z ${TP_DOMAIN} ]]; then echo 'No domain set, defaulting to theme-park.dev' TP_DOMAIN='theme-park.dev' fi +if [[ -z ${TP_SCHEME} ]]; then + echo 'No scheme set, defaulting to https' + TP_SCHEME='https' +fi THEME_TYPE='theme-options' if [ "${TP_COMMUNITY_THEME}" = true ]; then @@ -37,8 +42,8 @@ if [[ -z ${TP_THEME} ]]; then fi sed_file(){ - sed -i "s/<\/head>/<\/head> /g" $1 - sed -i "s/<\/head>/<\/head> /g" $1 + sed -i "s/<\/head>/<\/head> /g" $1 + sed -i "s/<\/head>/<\/head> /g" $1 printf 'Stylesheet set to %s on %s\n\n' "${TP_THEME}" "$1" } diff --git a/docker-mods/emby/root/etc/cont-init.d/98-themepark b/docker-mods/emby/root/etc/cont-init.d/98-themepark index 91f67ef5..215209dc 100644 --- a/docker-mods/emby/root/etc/cont-init.d/98-themepark +++ b/docker-mods/emby/root/etc/cont-init.d/98-themepark @@ -8,6 +8,7 @@ echo '-------------------------' echo -e "Variables set:\\n\ 'TP_DOMAIN'=${TP_DOMAIN}\\n\ 'TP_COMMUNITY_THEME'=${TP_COMMUNITY_THEME}\\n\ +'TP_SCHEME'=${TP_SCHEME}\\n\ 'TP_THEME'=${TP_THEME}\\n" # Set default @@ -15,6 +16,10 @@ if [[ -z ${TP_DOMAIN} ]]; then echo 'No domain set, defaulting to theme-park.dev' TP_DOMAIN='theme-park.dev' fi +if [[ -z ${TP_SCHEME} ]]; then + echo 'No scheme set, defaulting to https' + TP_SCHEME='https' +fi THEME_TYPE='theme-options' if [ "${TP_COMMUNITY_THEME}" = true ]; then @@ -34,5 +39,5 @@ if [[ -z ${TP_THEME} ]]; then fi # Adding stylesheets -printf '%s\n' "@import url('https://${TP_DOMAIN}/css/${THEME_TYPE}/${TP_THEME}.css');" "@import url('https://${TP_DOMAIN}/css/base/emby/emby-base.css');" > /app/emby/dashboard-ui/modules/themes/light/theme.css +printf '%s\n' "@import url('${TP_SCHEME}://${TP_DOMAIN}/css/${THEME_TYPE}/${TP_THEME}.css');" "@import url('${TP_SCHEME}://${TP_DOMAIN}/css/base/emby/emby-base.css');" > /app/emby/dashboard-ui/modules/themes/light/theme.css printf 'Stylesheet set to %s\n' "${TP_THEME}" diff --git a/docker-mods/jackett/root/etc/cont-init.d/98-themepark b/docker-mods/jackett/root/etc/cont-init.d/98-themepark index 3dd618d4..abaf1b50 100644 --- a/docker-mods/jackett/root/etc/cont-init.d/98-themepark +++ b/docker-mods/jackett/root/etc/cont-init.d/98-themepark @@ -8,6 +8,7 @@ echo '---------------------------' echo -e "Variables set:\\n\ 'TP_DOMAIN'=${TP_DOMAIN}\\n\ 'TP_COMMUNITY_THEME'=${TP_COMMUNITY_THEME}\\n\ +'TP_SCHEME'=${TP_SCHEME}\\n\ 'TP_THEME'=${TP_THEME}\\n" APP_FILEPATH='/app/Jackett/Content/index.html' @@ -21,6 +22,10 @@ if [[ -z ${TP_DOMAIN} ]]; then echo 'No domain set, defaulting to theme-park.dev' TP_DOMAIN='theme-park.dev' fi +if [[ -z ${TP_SCHEME} ]]; then + echo 'No scheme set, defaulting to https' + TP_SCHEME='https' +fi THEME_TYPE='theme-options' if [ "${TP_COMMUNITY_THEME}" = true ]; then @@ -44,8 +49,8 @@ if ! grep -q "${TP_DOMAIN}/css/base" "${APP_FILEPATH}"; then echo '---------------------------' echo '| Adding the stylesheet |' echo '---------------------------' - sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}" - sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}" + sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}" + 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/root/etc/cont-init.d/98-themepark b/docker-mods/jellyfin/root/etc/cont-init.d/98-themepark index edfb5e08..18e53c79 100644 --- a/docker-mods/jellyfin/root/etc/cont-init.d/98-themepark +++ b/docker-mods/jellyfin/root/etc/cont-init.d/98-themepark @@ -8,6 +8,7 @@ echo '-----------------------------' echo -e "Variables set:\\n\ 'TP_DOMAIN'=${TP_DOMAIN}\\n\ 'TP_COMMUNITY_THEME'=${TP_COMMUNITY_THEME}\\n\ +'TP_SCHEME'=${TP_SCHEME}\\n\ 'TP_THEME'=${TP_THEME}\\n" # Set default @@ -15,6 +16,10 @@ if [[ -z ${TP_DOMAIN} ]]; then echo 'No domain set, defaulting to theme-park.dev' TP_DOMAIN='theme-park.dev' fi +if [[ -z ${TP_SCHEME} ]]; then + echo 'No scheme set, defaulting to https' + TP_SCHEME='https' +fi THEME_TYPE='theme-options' if [ "${TP_COMMUNITY_THEME}" = true ]; then @@ -38,8 +43,8 @@ if ! grep -q "${TP_DOMAIN}/css/base" /usr/share/jellyfin/web/index.html; then echo '---------------------------' echo '| Adding the stylesheet |' echo '---------------------------' - sed -i "s/<\/body>/<\/body> /g" /usr/share/jellyfin/web/index.html - sed -i "s/<\/body>/<\/body> /g" /usr/share/jellyfin/web/index.html + sed -i "s/<\/body>/<\/body> /g" /usr/share/jellyfin/web/index.html + sed -i "s/<\/body>/<\/body> /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/root/etc/cont-init.d/98-themepark b/docker-mods/lazylibrarian/root/etc/cont-init.d/98-themepark index 5959143b..d8714131 100644 --- a/docker-mods/lazylibrarian/root/etc/cont-init.d/98-themepark +++ b/docker-mods/lazylibrarian/root/etc/cont-init.d/98-themepark @@ -8,6 +8,7 @@ echo '----------------------------------' echo -e "Variables set:\\n\ 'TP_DOMAIN'=${TP_DOMAIN}\\n\ 'TP_COMMUNITY_THEME'=${TP_COMMUNITY_THEME}\\n\ +'TP_SCHEME'=${TP_SCHEME}\\n\ 'TP_THEME'=${TP_THEME}\\n" # Set default @@ -15,6 +16,10 @@ if [[ -z ${TP_DOMAIN} ]]; then echo 'No domain set, defaulting to theme-park.dev' TP_DOMAIN='theme-park.dev' fi +if [[ -z ${TP_SCHEME} ]]; then + echo 'No scheme set, defaulting to https' + TP_SCHEME='https' +fi THEME_TYPE='theme-options' if [ "${TP_COMMUNITY_THEME}" = true ]; then @@ -38,8 +43,8 @@ if ! grep -q "${TP_DOMAIN}/css/base" /app/lazylibrarian/data/interfaces/bookstra echo '---------------------------' echo '| Adding the stylesheet |' echo '---------------------------' - sed -i "s/<\/head>/<\/head> /g" /app/lazylibrarian/data/interfaces/bookstrap/base.html - sed -i "s/<\/head>/<\/head> /g" /app/lazylibrarian/data/interfaces/bookstrap/base.html + sed -i "s/<\/head>/<\/head> /g" /app/lazylibrarian/data/interfaces/bookstrap/base.html + 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/root/etc/cont-init.d/98-themepark b/docker-mods/librespeed/root/etc/cont-init.d/98-themepark index 1dff5682..6d1ccf9c 100644 --- a/docker-mods/librespeed/root/etc/cont-init.d/98-themepark +++ b/docker-mods/librespeed/root/etc/cont-init.d/98-themepark @@ -8,6 +8,7 @@ echo '-------------------------------' echo -e "Variables set:\\n\ 'TP_DOMAIN'=${TP_DOMAIN}\\n\ 'TP_COMMUNITY_THEME'=${TP_COMMUNITY_THEME}\\n\ +'TP_SCHEME'=${TP_SCHEME}\\n\ 'TP_THEME'=${TP_THEME}\\n" # Set default @@ -15,6 +16,10 @@ if [[ -z ${TP_DOMAIN} ]]; then echo 'No domain set, defaulting to theme-park.dev' TP_DOMAIN='theme-park.dev' fi +if [[ -z ${TP_SCHEME} ]]; then + echo 'No scheme set, defaulting to https' + TP_SCHEME='https' +fi THEME_TYPE='theme-options' if [ "${TP_COMMUNITY_THEME}" = true ]; then @@ -38,8 +43,8 @@ if ! grep -q "${TP_DOMAIN}/css/base" /usr/share/webapps/librespeed/index.html; t echo '---------------------------' echo '| Adding the stylesheet |' echo '---------------------------' - sed -i "s/<\/head>/<\/head> /g" /usr/share/webapps/librespeed/index.html - sed -i "s/<\/head>/<\/head> /g" /usr/share/webapps/librespeed/index.html + sed -i "s/<\/head>/<\/head> /g" /usr/share/webapps/librespeed/index.html + 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/root/etc/cont-init.d/98-themepark b/docker-mods/lidarr/root/etc/cont-init.d/98-themepark index d135e134..0b1471c2 100644 --- a/docker-mods/lidarr/root/etc/cont-init.d/98-themepark +++ b/docker-mods/lidarr/root/etc/cont-init.d/98-themepark @@ -8,6 +8,7 @@ echo '---------------------------' echo -e "Variables set:\\n\ 'TP_DOMAIN'=${TP_DOMAIN}\\n\ 'TP_COMMUNITY_THEME'=${TP_COMMUNITY_THEME}\\n\ +'TP_SCHEME'=${TP_SCHEME}\\n\ 'TP_ADDON'=${TP_ADDON}\\n\ 'TP_THEME'=${TP_THEME}\\n" @@ -24,6 +25,10 @@ if [[ -z ${TP_DOMAIN} ]]; then echo 'No domain set, defaulting to theme-park.dev' TP_DOMAIN='theme-park.dev' fi +if [[ -z ${TP_SCHEME} ]]; then + echo 'No scheme set, defaulting to https' + TP_SCHEME='https' +fi THEME_TYPE='theme-options' if [ "${TP_COMMUNITY_THEME}" = true ]; then @@ -47,15 +52,15 @@ if ! grep -q "${TP_DOMAIN}/css/base" "${APP_FILEPATH}"; then echo '---------------------------' echo '| Adding the stylesheet |' echo '---------------------------' - sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}" - sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}" - sed -i "s/<\/head>/<\/head> /g" "${LOGIN_FILEPATH}" - sed -i "s/<\/head>/<\/head> /g" "${LOGIN_FILEPATH}" + sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}" + sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}" + sed -i "s/<\/head>/<\/head> /g" "${LOGIN_FILEPATH}" + sed -i "s/<\/head>/<\/head> /g" "${LOGIN_FILEPATH}" 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" "${APP_FILEPATH}" - sed -i "s/<\/head>/<\/head> /g" "${LOGIN_FILEPATH}" + sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}" + sed -i "s/<\/head>/<\/head> /g" "${LOGIN_FILEPATH}" printf 'Added custom addon: %s\n\n' "${addon}" done fi diff --git a/docker-mods/mylar3/root/etc/cont-init.d/98-themepark b/docker-mods/mylar3/root/etc/cont-init.d/98-themepark index b737f741..65732690 100644 --- a/docker-mods/mylar3/root/etc/cont-init.d/98-themepark +++ b/docker-mods/mylar3/root/etc/cont-init.d/98-themepark @@ -16,6 +16,7 @@ echo -e "Variables set:\\n\ 'TP_HOTIO'=${TP_HOTIO}\\n\ 'TP_DOMAIN'=${TP_DOMAIN}\\n\ 'TP_COMMUNITY_THEME'=${TP_COMMUNITY_THEME}\\n\ +'TP_SCHEME'=${TP_SCHEME}\\n\ 'TP_THEME'=${TP_THEME}\\n" # Set default @@ -23,6 +24,10 @@ if [[ -z ${TP_DOMAIN} ]]; then echo 'No domain set, defaulting to theme-park.dev' TP_DOMAIN='theme-park.dev' fi +if [[ -z ${TP_SCHEME} ]]; then + echo 'No scheme set, defaulting to https' + TP_SCHEME='https' +fi THEME_TYPE='theme-options' if [ "${TP_COMMUNITY_THEME}" = true ]; then @@ -42,8 +47,8 @@ if [[ -z ${TP_THEME} ]]; then fi sed_file(){ - sed -i "s/<\/head>/<\/head> /g" $1 - sed -i "s/<\/head>/<\/head> /g" $1 + sed -i "s/<\/head>/<\/head> /g" $1 + sed -i "s/<\/head>/<\/head> /g" $1 printf 'Stylesheet set to %s on %s\n\n' "${TP_THEME}" "$1" } diff --git a/docker-mods/nzbget/root/etc/cont-init.d/98-themepark b/docker-mods/nzbget/root/etc/cont-init.d/98-themepark index 11627c1b..3e94d1e1 100644 --- a/docker-mods/nzbget/root/etc/cont-init.d/98-themepark +++ b/docker-mods/nzbget/root/etc/cont-init.d/98-themepark @@ -8,6 +8,7 @@ echo '---------------------------' echo -e "Variables set:\\n\ 'TP_DOMAIN'=${TP_DOMAIN}\\n\ 'TP_COMMUNITY_THEME'=${TP_COMMUNITY_THEME}\\n\ +'TP_SCHEME'=${TP_SCHEME}\\n\ 'TP_THEME'=${TP_THEME}\\n" APP_FILEPATH='/app/nzbget/webui/index.html' @@ -20,6 +21,10 @@ if [[ -z ${TP_DOMAIN} ]]; then echo 'No domain set, defaulting to theme-park.dev' TP_DOMAIN='theme-park.dev' fi +if [[ -z ${TP_SCHEME} ]]; then + echo 'No scheme set, defaulting to https' + TP_SCHEME='https' +fi THEME_TYPE='theme-options' if [ "${TP_COMMUNITY_THEME}" = true ]; then @@ -43,7 +48,7 @@ if ! grep -q "${TP_DOMAIN}/css/base" "${APP_FILEPATH}"; then echo '---------------------------' echo '| Adding the stylesheet |' echo '---------------------------' - sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}" - sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}" + sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}" + 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/root/etc/cont-init.d/98-themepark b/docker-mods/plex/root/etc/cont-init.d/98-themepark index f6c4449f..eabe9546 100644 --- a/docker-mods/plex/root/etc/cont-init.d/98-themepark +++ b/docker-mods/plex/root/etc/cont-init.d/98-themepark @@ -8,6 +8,7 @@ echo '-------------------------' echo -e "Variables set:\\n\ 'TP_DOMAIN'=${TP_DOMAIN}\\n\ 'TP_COMMUNITY_THEME'=${TP_COMMUNITY_THEME}\\n\ +'TP_SCHEME'=${TP_SCHEME}\\n\ 'TP_THEME'=${TP_THEME}\\n" APP_FILEPATH='' @@ -21,6 +22,10 @@ if [[ -z ${TP_DOMAIN} ]]; then echo 'No domain set, defaulting to theme-park.dev' TP_DOMAIN='theme-park.dev' fi +if [[ -z ${TP_SCHEME} ]]; then + echo 'No scheme set, defaulting to https' + TP_SCHEME='https' +fi THEME_TYPE='theme-options' if [ "${TP_COMMUNITY_THEME}" = true ]; then @@ -44,12 +49,12 @@ if ! grep -q "${TP_DOMAIN}/css/base" "${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 - 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 + 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" "${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 'Added custom addon: %s\n\n' "${addon}" done fi diff --git a/docker-mods/prowlarr/root/etc/cont-init.d/98-themepark b/docker-mods/prowlarr/root/etc/cont-init.d/98-themepark index 6ebe7163..37afbbbd 100644 --- a/docker-mods/prowlarr/root/etc/cont-init.d/98-themepark +++ b/docker-mods/prowlarr/root/etc/cont-init.d/98-themepark @@ -8,6 +8,7 @@ echo '---------------------------' echo -e "Variables set:\\n\ 'TP_DOMAIN'=${TP_DOMAIN}\\n\ 'TP_COMMUNITY_THEME'=${TP_COMMUNITY_THEME}\\n\ +'TP_SCHEME'=${TP_SCHEME}\\n\ 'TP_ADDON'=${TP_ADDON}\\n\ 'TP_THEME'=${TP_THEME}\\n" @@ -24,6 +25,10 @@ if [[ -z ${TP_DOMAIN} ]]; then echo 'No domain set, defaulting to theme-park.dev' TP_DOMAIN='theme-park.dev' fi +if [[ -z ${TP_SCHEME} ]]; then + echo 'No scheme set, defaulting to https' + TP_SCHEME='https' +fi THEME_TYPE='theme-options' if [ "${TP_COMMUNITY_THEME}" = true ]; then @@ -47,15 +52,15 @@ if ! grep -q "${TP_DOMAIN}/css/base" "${APP_FILEPATH}"; then echo '---------------------------' echo '| Adding the stylesheet |' echo '---------------------------' - sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}" - sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}" - sed -i "s/<\/head>/<\/head> /g" "${LOGIN_FILEPATH}" - sed -i "s/<\/head>/<\/head> /g" "${LOGIN_FILEPATH}" + sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}" + sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}" + sed -i "s/<\/head>/<\/head> /g" "${LOGIN_FILEPATH}" + sed -i "s/<\/head>/<\/head> /g" "${LOGIN_FILEPATH}" 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" "${APP_FILEPATH}" - sed -i "s/<\/head>/<\/head> /g" "${LOGIN_FILEPATH}" + sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}" + sed -i "s/<\/head>/<\/head> /g" "${LOGIN_FILEPATH}" printf 'Added custom addon: %s\n\n' "${addon}" done fi diff --git a/docker-mods/qbittorrent/root/etc/cont-init.d/98-themepark b/docker-mods/qbittorrent/root/etc/cont-init.d/98-themepark index 99dd3caa..fe5df1d8 100644 --- a/docker-mods/qbittorrent/root/etc/cont-init.d/98-themepark +++ b/docker-mods/qbittorrent/root/etc/cont-init.d/98-themepark @@ -43,6 +43,7 @@ echo -e "Variables set:\\n\ 'TP_HOTIO'=${TP_HOTIO}\\n\ 'TP_DOMAIN'=${TP_DOMAIN}\\n\ 'TP_COMMUNITY_THEME'=${TP_COMMUNITY_THEME}\\n\ +'TP_SCHEME'=${TP_SCHEME}\\n\ 'TP_THEME'=${TP_THEME}\\n" # Set default @@ -50,6 +51,10 @@ if [[ -z ${TP_DOMAIN} ]]; then echo 'No domain set, defaulting to theme-park.dev' TP_DOMAIN='theme-park.dev' fi +if [[ -z ${TP_SCHEME} ]]; then + echo 'No scheme set, defaulting to https' + TP_SCHEME='https' +fi THEME_TYPE='theme-options' if [ "${TP_COMMUNITY_THEME}" = true ]; then @@ -85,8 +90,8 @@ if [[ ! -d /themepark ]]; then fi sed_file(){ - sed -i "s/<\/body>/<\/body> /g" $1 - sed -i "s/<\/body>/<\/body> /g" $1 + sed -i "s/<\/body>/<\/body> /g" $1 + sed -i "s/<\/body>/<\/body> /g" $1 printf 'Stylesheet set to %s on %s\n\n' "${TP_THEME}" "$1" } diff --git a/docker-mods/radarr/root/etc/cont-init.d/98-themepark b/docker-mods/radarr/root/etc/cont-init.d/98-themepark index e35a34f8..4051c1fd 100644 --- a/docker-mods/radarr/root/etc/cont-init.d/98-themepark +++ b/docker-mods/radarr/root/etc/cont-init.d/98-themepark @@ -8,6 +8,7 @@ echo '---------------------------' echo -e "Variables set:\\n\ 'TP_DOMAIN'=${TP_DOMAIN}\\n\ 'TP_COMMUNITY_THEME'=${TP_COMMUNITY_THEME}\\n\ +'TP_SCHEME'=${TP_SCHEME}\\n\ 'TP_ADDON'=${TP_ADDON}\\n\ 'TP_THEME'=${TP_THEME}\\n" @@ -24,6 +25,10 @@ if [[ -z ${TP_DOMAIN} ]]; then echo 'No domain set, defaulting to theme-park.dev' TP_DOMAIN='theme-park.dev' fi +if [[ -z ${TP_SCHEME} ]]; then + echo 'No scheme set, defaulting to https' + TP_SCHEME='https' +fi THEME_TYPE='theme-options' if [ "${TP_COMMUNITY_THEME}" = true ]; then @@ -47,15 +52,15 @@ if ! grep -q "${TP_DOMAIN}/css/base" "${APP_FILEPATH}"; then echo '---------------------------' echo '| Adding the stylesheet |' echo '---------------------------' - sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}" - sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}" - sed -i "s/<\/head>/<\/head> /g" "${LOGIN_FILEPATH}" - sed -i "s/<\/head>/<\/head> /g" "${LOGIN_FILEPATH}" + sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}" + sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}" + sed -i "s/<\/head>/<\/head> /g" "${LOGIN_FILEPATH}" + sed -i "s/<\/head>/<\/head> /g" "${LOGIN_FILEPATH}" 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" "${APP_FILEPATH}" - sed -i "s/<\/head>/<\/head> /g" "${LOGIN_FILEPATH}" + sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}" + sed -i "s/<\/head>/<\/head> /g" "${LOGIN_FILEPATH}" printf 'Added custom addon: %s\n\n' "${addon}" done fi diff --git a/docker-mods/readarr/root/etc/cont-init.d/98-themepark b/docker-mods/readarr/root/etc/cont-init.d/98-themepark index 8b2ae8c2..28f2b78d 100644 --- a/docker-mods/readarr/root/etc/cont-init.d/98-themepark +++ b/docker-mods/readarr/root/etc/cont-init.d/98-themepark @@ -8,6 +8,7 @@ echo '---------------------------' echo -e "Variables set:\\n\ 'TP_DOMAIN'=${TP_DOMAIN}\\n\ 'TP_COMMUNITY_THEME'=${TP_COMMUNITY_THEME}\\n\ +'TP_SCHEME'=${TP_SCHEME}\\n\ 'TP_ADDON'=${TP_ADDON}\\n\ 'TP_THEME'=${TP_THEME}\\n" @@ -24,6 +25,10 @@ if [[ -z ${TP_DOMAIN} ]]; then echo 'No domain set, defaulting to theme-park.dev' TP_DOMAIN='theme-park.dev' fi +if [[ -z ${TP_SCHEME} ]]; then + echo 'No scheme set, defaulting to https' + TP_SCHEME='https' +fi THEME_TYPE='theme-options' if [ "${TP_COMMUNITY_THEME}" = true ]; then @@ -47,15 +52,15 @@ if ! grep -q "${TP_DOMAIN}/css/base" "${APP_FILEPATH}"; then echo '---------------------------' echo '| Adding the stylesheet |' echo '---------------------------' - sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}" - sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}" - sed -i "s/<\/head>/<\/head> /g" "${LOGIN_FILEPATH}" - sed -i "s/<\/head>/<\/head> /g" "${LOGIN_FILEPATH}" + sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}" + sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}" + sed -i "s/<\/head>/<\/head> /g" "${LOGIN_FILEPATH}" + sed -i "s/<\/head>/<\/head> /g" "${LOGIN_FILEPATH}" 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" "${APP_FILEPATH}" - sed -i "s/<\/head>/<\/head> /g" "${LOGIN_FILEPATH}" + sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}" + sed -i "s/<\/head>/<\/head> /g" "${LOGIN_FILEPATH}" printf 'Added custom addon: %s\n\n' "${addon}" done fi diff --git a/docker-mods/rutorrent/root/etc/cont-init.d/98-themepark b/docker-mods/rutorrent/root/etc/cont-init.d/98-themepark index 9cd87d4d..f57b9c48 100644 --- a/docker-mods/rutorrent/root/etc/cont-init.d/98-themepark +++ b/docker-mods/rutorrent/root/etc/cont-init.d/98-themepark @@ -8,6 +8,7 @@ echo '------------------------------' echo -e "Variables set:\\n\ 'TP_DOMAIN'=${TP_DOMAIN}\\n\ 'TP_COMMUNITY_THEME'=${TP_COMMUNITY_THEME}\\n\ +'TP_SCHEME'=${TP_SCHEME}\\n\ 'TP_THEME'=${TP_THEME}\\n" # Set default @@ -15,6 +16,10 @@ if [[ -z ${TP_DOMAIN} ]]; then echo 'No domain set, defaulting to theme-park.dev' TP_DOMAIN='theme-park.dev' fi +if [[ -z ${TP_SCHEME} ]]; then + echo 'No scheme set, defaulting to https' + TP_SCHEME='https' +fi THEME_TYPE='theme-options' if [ "${TP_COMMUNITY_THEME}" = true ]; then @@ -38,8 +43,8 @@ if ! grep -q "${TP_DOMAIN}/css/base" /app/rutorrent/index.html; then echo '---------------------------' echo '| Adding the stylesheet |' echo '---------------------------' - sed -i "s/<\/head>/<\/head> /g" /app/rutorrent/index.html - sed -i "s/<\/head>/<\/head> /g" /app/rutorrent/index.html + sed -i "s/<\/head>/<\/head> /g" /app/rutorrent/index.html + 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/root/etc/cont-init.d/98-themepark b/docker-mods/sabnzbd/root/etc/cont-init.d/98-themepark index 6e16bb53..129cf6ea 100644 --- a/docker-mods/sabnzbd/root/etc/cont-init.d/98-themepark +++ b/docker-mods/sabnzbd/root/etc/cont-init.d/98-themepark @@ -8,6 +8,7 @@ echo '----------------------------' echo -e "Variables set:\\n\ 'TP_DOMAIN'=${TP_DOMAIN}\\n\ 'TP_COMMUNITY_THEME'=${TP_COMMUNITY_THEME}\\n\ +'TP_SCHEME'=${TP_SCHEME}\\n\ 'TP_THEME'=${TP_THEME}\\n" APP_FILEPATH='/app/sabnzbd' @@ -21,6 +22,10 @@ if [[ -z ${TP_DOMAIN} ]]; then echo 'No domain set, defaulting to theme-park.dev' TP_DOMAIN='theme-park.dev' fi +if [[ -z ${TP_SCHEME} ]]; then + echo 'No scheme set, defaulting to https' + TP_SCHEME='https' +fi THEME_TYPE='theme-options' if [ "${TP_COMMUNITY_THEME}" = true ]; then @@ -44,13 +49,13 @@ if ! grep -q "${TP_DOMAIN}/css/base" "${APP_FILEPATH}/interfaces/Glitter/templat 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" - 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" + 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" + 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/root/etc/cont-init.d/98-themepark b/docker-mods/sonarr/root/etc/cont-init.d/98-themepark index d11aa64e..636eb2ae 100644 --- a/docker-mods/sonarr/root/etc/cont-init.d/98-themepark +++ b/docker-mods/sonarr/root/etc/cont-init.d/98-themepark @@ -8,6 +8,7 @@ echo '---------------------------' echo -e "Variables set:\\n\ 'TP_DOMAIN'=${TP_DOMAIN}\\n\ 'TP_COMMUNITY_THEME'=${TP_COMMUNITY_THEME}\\n\ +'TP_SCHEME'=${TP_SCHEME}\\n\ 'TP_ADDON'=${TP_ADDON}\\n\ 'TP_THEME'=${TP_THEME}\\n" @@ -24,6 +25,10 @@ if [[ -z ${TP_DOMAIN} ]]; then echo 'No domain set, defaulting to theme-park.dev' TP_DOMAIN='theme-park.dev' fi +if [[ -z ${TP_SCHEME} ]]; then + echo 'No scheme set, defaulting to https' + TP_SCHEME='https' +fi THEME_TYPE='theme-options' if [ "${TP_COMMUNITY_THEME}" = true ]; then @@ -47,15 +52,15 @@ if ! grep -q "${TP_DOMAIN}/css/base" "${APP_FILEPATH}"; then echo '---------------------------' echo '| Adding the stylesheet |' echo '---------------------------' - sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}" - sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}" - sed -i "s/<\/head>/<\/head> /g" "${LOGIN_FILEPATH}" - sed -i "s/<\/head>/<\/head> /g" "${LOGIN_FILEPATH}" + sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}" + sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}" + sed -i "s/<\/head>/<\/head> /g" "${LOGIN_FILEPATH}" + sed -i "s/<\/head>/<\/head> /g" "${LOGIN_FILEPATH}" 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" "${APP_FILEPATH}" - sed -i "s/<\/head>/<\/head> /g" "${LOGIN_FILEPATH}" + sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}" + sed -i "s/<\/head>/<\/head> /g" "${LOGIN_FILEPATH}" printf 'Added custom addon: %s\n\n' "${addon}" done fi diff --git a/docker-mods/synclounge/root/etc/cont-init.d/98-themepark b/docker-mods/synclounge/root/etc/cont-init.d/98-themepark index f3ea1e80..1b0a160e 100644 --- a/docker-mods/synclounge/root/etc/cont-init.d/98-themepark +++ b/docker-mods/synclounge/root/etc/cont-init.d/98-themepark @@ -8,6 +8,7 @@ echo '-------------------------------' echo -e "Variables set:\\n\ 'TP_DOMAIN'=${TP_DOMAIN}\\n\ 'TP_COMMUNITY_THEME'=${TP_COMMUNITY_THEME}\\n\ +'TP_SCHEME'=${TP_SCHEME}\\n\ 'TP_THEME'=${TP_THEME}\\n" # Set default @@ -15,6 +16,10 @@ if [[ -z ${TP_DOMAIN} ]]; then echo 'No domain set, defaulting to theme-park.dev' TP_DOMAIN='theme-park.dev' fi +if [[ -z ${TP_SCHEME} ]]; then + echo 'No scheme set, defaulting to https' + TP_SCHEME='https' +fi THEME_TYPE='theme-options' if [ "${TP_COMMUNITY_THEME}" = true ]; then @@ -38,8 +43,8 @@ if ! grep -q "${TP_DOMAIN}/css/base" /usr/lib/node_modules/synclounge/dist/index echo '---------------------------' echo '| Adding the stylesheet |' echo '---------------------------' - sed -i "s/<\/head>/<\/head> /g" /usr/lib/node_modules/synclounge/dist/index.html - sed -i "s/<\/head>/<\/head> /g" /usr/lib/node_modules/synclounge/dist/index.html + sed -i "s/<\/head>/<\/head> /g" /usr/lib/node_modules/synclounge/dist/index.html + 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/root/etc/cont-init.d/98-themepark b/docker-mods/tautulli/root/etc/cont-init.d/98-themepark index 58a7fdfa..4013d706 100644 --- a/docker-mods/tautulli/root/etc/cont-init.d/98-themepark +++ b/docker-mods/tautulli/root/etc/cont-init.d/98-themepark @@ -8,6 +8,7 @@ echo '-----------------------------' echo -e "Variables set:\\n\ 'TP_DOMAIN'=${TP_DOMAIN}\\n\ 'TP_COMMUNITY_THEME'=${TP_COMMUNITY_THEME}\\n\ +'TP_SCHEME'=${TP_SCHEME}\\n\ 'TP_THEME'=${TP_THEME}\\n" APP_FILEPATH='/app/tautulli/data/interfaces/default/base.html' @@ -21,6 +22,10 @@ if [[ -z ${TP_DOMAIN} ]]; then echo 'No domain set, defaulting to theme-park.dev' TP_DOMAIN='theme-park.dev' fi +if [[ -z ${TP_SCHEME} ]]; then + echo 'No scheme set, defaulting to https' + TP_SCHEME='https' +fi THEME_TYPE='theme-options' if [ "${TP_COMMUNITY_THEME}" = true ]; then @@ -44,7 +49,7 @@ if ! grep -q "${TP_DOMAIN}/css/base" "${APP_FILEPATH}"; then echo '---------------------------' echo '| Adding the stylesheet |' echo '---------------------------' - sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}" - sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}" + sed -i "s/<\/head>/<\/head> /g" "${APP_FILEPATH}" + 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/root/etc/cont-init.d/98-themepark b/docker-mods/thelounge/root/etc/cont-init.d/98-themepark index c7b85b00..96bc372b 100644 --- a/docker-mods/thelounge/root/etc/cont-init.d/98-themepark +++ b/docker-mods/thelounge/root/etc/cont-init.d/98-themepark @@ -8,6 +8,7 @@ echo '-------------------------------' echo -e "Variables set:\\n\ 'TP_DOMAIN'=${TP_DOMAIN}\\n\ 'TP_COMMUNITY_THEME'=${TP_COMMUNITY_THEME}\\n\ +'TP_SCHEME'=${TP_SCHEME}\\n\ 'TP_THEME'=${TP_THEME}\\n" # Set default @@ -15,6 +16,10 @@ if [[ -z ${TP_DOMAIN} ]]; then echo 'No domain set, defaulting to theme-park.dev' TP_DOMAIN='theme-park.dev' fi +if [[ -z ${TP_SCHEME} ]]; then + echo 'No scheme set, defaulting to https' + TP_SCHEME='https' +fi THEME_TYPE='theme-options' if [ "${TP_COMMUNITY_THEME}" = true ]; then @@ -38,8 +43,8 @@ if ! grep -q "${TP_DOMAIN}/css/base" /usr/lib/node_modules/thelounge/client/inde echo '---------------------------' echo '| Adding the stylesheet |' echo '---------------------------' - sed -i "s/<\/head>/<\/head> /g" /usr/lib/node_modules/thelounge/client/index.html.tpl - sed -i "s/<\/head>/<\/head> /g" /usr/lib/node_modules/thelounge/client/index.html.tpl + sed -i "s/<\/head>/<\/head> /g" /usr/lib/node_modules/thelounge/client/index.html.tpl + 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/root/etc/cont-init.d/98-themepark b/docker-mods/transmission/root/etc/cont-init.d/98-themepark index 2dfab788..45c27963 100644 --- a/docker-mods/transmission/root/etc/cont-init.d/98-themepark +++ b/docker-mods/transmission/root/etc/cont-init.d/98-themepark @@ -8,6 +8,7 @@ echo '---------------------------------' echo -e "Variables set:\\n\ 'TP_DOMAIN'=${TP_DOMAIN}\\n\ 'TP_COMMUNITY_THEME'=${TP_COMMUNITY_THEME}\\n\ +'TP_SCHEME'=${TP_SCHEME}\\n\ 'TP_THEME'=${TP_THEME}\\n" # Set default @@ -15,6 +16,10 @@ if [[ -z ${TP_DOMAIN} ]]; then echo 'No domain set, defaulting to theme-park.dev' TP_DOMAIN='theme-park.dev' fi +if [[ -z ${TP_SCHEME} ]]; then + echo 'No scheme set, defaulting to https' + TP_SCHEME='https' +fi THEME_TYPE='theme-options' if [ "${TP_COMMUNITY_THEME}" = true ]; then @@ -38,8 +43,8 @@ if ! grep -q "${TP_DOMAIN}/css/base" /usr/share/transmission/web/index.html; the echo '---------------------------' echo '| Adding the stylesheet |' echo '---------------------------' - sed -i "s/<\/head>/<\/head> /g" /usr/share/transmission/web/index.html - sed -i "s/<\/head>/<\/head> /g" /usr/share/transmission/web/index.html + sed -i "s/<\/head>/<\/head> /g" /usr/share/transmission/web/index.html + 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/root/etc/cont-init.d/98-themepark b/docker-mods/vuetorrent/root/etc/cont-init.d/98-themepark index 28f360a3..d0cb8981 100644 --- a/docker-mods/vuetorrent/root/etc/cont-init.d/98-themepark +++ b/docker-mods/vuetorrent/root/etc/cont-init.d/98-themepark @@ -24,6 +24,7 @@ fi echo -e "Variables set:\\n\ 'TP_DOMAIN'=${TP_DOMAIN}\\n\ 'TP_COMMUNITY_THEME'=${TP_COMMUNITY_THEME}\\n\ +'TP_SCHEME'=${TP_SCHEME}\\n\ 'TP_THEME'=${TP_THEME}\\n" # Set default @@ -31,6 +32,10 @@ if [[ -z ${TP_DOMAIN} ]]; then echo 'No domain set, defaulting to theme-park.dev' TP_DOMAIN='theme-park.dev' fi +if [[ -z ${TP_SCHEME} ]]; then + echo 'No scheme set, defaulting to https' + TP_SCHEME='https' +fi THEME_TYPE='theme-options' if [ "${TP_COMMUNITY_THEME}" = true ]; then @@ -138,7 +143,7 @@ if ! grep -q "${TP_DOMAIN}/css/base" "${INDEX_FILEPATH}"; then echo '---------------------------------------------------------' echo '| Adding the stylesheet to /vuetorrent/public/index.html |' echo '---------------------------------------------------------' - sed -i "s/<\/body>/<\/body> /g" "${INDEX_FILEPATH}" - sed -i "s/<\/body>/<\/body> /g" "${INDEX_FILEPATH}" + sed -i "s/<\/body>/<\/body> /g" "${INDEX_FILEPATH}" + 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 diff --git a/docker/root/defaults/default b/docker/root/defaults/default index 58eddb72..4388d9a3 100644 --- a/docker/root/defaults/default +++ b/docker/root/defaults/default @@ -9,8 +9,10 @@ server { location / { sub_filter_types *; - sub_filter 'https://theme-park.dev' $scheme://TP_DOMAIN; - sub_filter 'https://develop.theme-park.dev' $scheme://TP_DOMAIN; + sub_filter 'https://theme-park.dev' $scheme://TP_DOMAIN; + sub_filter 'http://theme-park.dev' $scheme://TP_DOMAIN; + sub_filter 'https://develop.theme-park.dev' $scheme://TP_DOMAIN; + sub_filter 'http://develop.theme-park.dev' $scheme://TP_DOMAIN; sub_filter_once off; try_files $uri $uri/ /index.html; } diff --git a/docker/root/etc/cont-init.d/50-config b/docker/root/etc/cont-init.d/50-config index 9d570ba0..e760064a 100644 --- a/docker/root/etc/cont-init.d/50-config +++ b/docker/root/etc/cont-init.d/50-config @@ -9,6 +9,7 @@ echo -e "Variables set:\\n\ PUID=${PUID}\\n\ PGID=${PGID}\\n\ TZ=${TZ}\\n\ +TP_SCHEME=${TP_SCHEME}\\n\ TP_DOMAIN=${TP_DOMAIN}\\n" if [[ -z ${TP_DOMAIN} ]]; then @@ -16,11 +17,8 @@ if [[ -z ${TP_DOMAIN} ]]; then TP_DOMAIN='$http_host' fi -DEFAULT='/config/nginx/site-confs/default' -if ! grep -q "sub_filter 'https://theme-park.dev' \$scheme://${TP_DOMAIN};" ${DEFAULT}; then - sed -i "s/sub_filter 'https:\/\/theme-park.dev' \$scheme:\/\/TP_DOMAIN;/sub_filter 'https:\/\/theme-park.dev' \$scheme:\/\/${TP_DOMAIN}; /g" ${DEFAULT} - sed -i "s/sub_filter 'https:\/\/develop.theme-park.dev' \$scheme:\/\/TP_DOMAIN;/sub_filter 'https:\/\/develop.theme-park.dev' \$scheme:\/\/${TP_DOMAIN}; /g" ${DEFAULT} -fi +sed -i "s/TP_DOMAIN;/${TP_DOMAIN}; /g" /defaults/default +cp /defaults/default /config/nginx/site-confs # make our folders and links mkdir -p \ diff --git a/themes.py b/themes.py index 48b50039..26f56044 100644 --- a/themes.py +++ b/themes.py @@ -38,12 +38,12 @@ def create_addons_json(): f"{addon_root}/{app}/{addon}") if isfile(join(f"{addon_root}/{app}/{addon}", file))] if len([f for f in files if f.endswith('.css')]) > 1: ADDONS["addons"][app][addon].update({ - "css": [f"https://{DOMAIN}/css/addons/{app}/{addon}/{file}?sha={SHAS.get(file)}" for file in files if file.split(".")[1] == "css"] + "css": [f"{scheme}://{DOMAIN}/css/addons/{app}/{addon}/{file}?sha={SHAS.get(file)}" for file in files if file.split(".")[1] == "css"] } ) else: ADDONS["addons"][app].update({ - addon: f"https://{DOMAIN}/css/addons/{app}/{addon}/{file}?sha={SHAS.get(file)}" for file in files if file.split(".")[1] == "css" + addon: f"{scheme}://{DOMAIN}/css/addons/{app}/{addon}/{file}?sha={SHAS.get(file)}" for file in files if file.split(".")[1] == "css" } ) extra_dirs = [dir for dir in listdir( @@ -54,7 +54,7 @@ def create_addons_json(): f"{addon_root}/{app}/{addon}/{dir}") if isfile(join(f"{addon_root}/{app}/{addon}/{dir}", file))] ADDONS["addons"][app][addon].update({ dir: { - "css": [f"https://{DOMAIN}/css/addons/{app}/{addon}/{dir}/{extra_file}?sha={SHAS.get(extra_file)}" for extra_file in extra_dir_files if extra_file.split(".")[1] == "css"] + "css": [f"{scheme}://{DOMAIN}/css/addons/{app}/{addon}/{dir}/{extra_file}?sha={SHAS.get(extra_file)}" for extra_file in extra_dir_files if extra_file.split(".")[1] == "css"] } } ) @@ -70,12 +70,12 @@ def create_json(app_folders: list = None, themes: list = None, community_themes: COMMUNITY_THEME_SHAS = get_shas(community_theme_shas) THEMES = { theme.split(".")[0].capitalize(): { - "url": f"https://{DOMAIN}/css/theme-options/{theme}?sha={THEME_SHAS.get(theme)}" + "url": f"{scheme}://{DOMAIN}/css/theme-options/{theme}?sha={THEME_SHAS.get(theme)}" }for theme in themes } COMMUNITY_THEMES = { theme.split(".")[0].capitalize(): { - "url": f"https://{DOMAIN}/css/community-theme-options/{theme}?sha={COMMUNITY_THEME_SHAS.get(theme)}" + "url": f"{scheme}://{DOMAIN}/css/community-theme-options/{theme}?sha={COMMUNITY_THEME_SHAS.get(theme)}" }for theme in community_themes } THEMES_DICT.update(dict(sorted({ @@ -98,7 +98,7 @@ def create_json(app_folders: list = None, themes: list = None, community_themes: APPS.update(dict(sorted({ "applications": { app: { - "base_css": f"https://{DOMAIN}/css/base/{app}/{app}-base.css?sha={SHAS.get(f'{app}-base.css')}", + "base_css": f"{scheme}://{DOMAIN}/css/base/{app}/{app}-base.css?sha={SHAS.get(f'{app}-base.css')}", "addons": ADDONS["addons"][app] if app in ADDONS["addons"] else {} } for app in app_folders if not isfile(f'./css/base/{app}/.deprecated') } @@ -106,7 +106,7 @@ def create_json(app_folders: list = None, themes: list = None, community_themes: APPS.update(dict(sorted({ "deprecated": { app: { - "base_css": f"https://{DOMAIN}/css/base/{app}/{app}-base.css?sha={SHAS.get(f'{app}-base.css')}", + "base_css": f"{scheme}://{DOMAIN}/css/base/{app}/{app}-base.css?sha={SHAS.get(f'{app}-base.css')}", "addons": ADDONS["addons"][app] if app in ADDONS["addons"] else {} } for app in app_folders if isfile(f'./css/base/{app}/.deprecated') } @@ -132,6 +132,7 @@ def create_theme_options(): create_css(folder) env_domain = env.get('TP_DOMAIN') +scheme = env.get('TP_SCHEME','https') if __name__ == "__main__": app_folders = [name for name in listdir('./css/base') if isdir(join('./css/base', name))]