GilbN
3 years ago
15 changed files with 777 additions and 777 deletions
@ -1,39 +1,39 @@ |
|||||
#!/usr/bin/with-contenv bash |
#!/usr/bin/with-contenv bash |
||||
|
|
||||
echo '---------------------------' |
echo '---------------------------' |
||||
echo '| Deluge theme.park Mod |' |
echo '| Deluge theme.park Mod |' |
||||
echo '---------------------------' |
echo '---------------------------' |
||||
|
|
||||
# Display variables for troubleshooting |
# Display variables for troubleshooting |
||||
echo -e "Variables set:\\n\ |
echo -e "Variables set:\\n\ |
||||
'TP_DOMAIN'=${TP_DOMAIN}\\n\ |
'TP_DOMAIN'=${TP_DOMAIN}\\n\ |
||||
'TP_THEME'=${TP_THEME}\\n" |
'TP_THEME'=${TP_THEME}\\n" |
||||
|
|
||||
# Set default |
# Set default |
||||
if [[ -z ${TP_DOMAIN} ]]; then |
if [[ -z ${TP_DOMAIN} ]]; then |
||||
echo 'No domain set, defaulting to theme-park.dev' |
echo 'No domain set, defaulting to theme-park.dev' |
||||
TP_DOMAIN='theme-park.dev' |
TP_DOMAIN='theme-park.dev' |
||||
fi |
fi |
||||
|
|
||||
case ${TP_DOMAIN} in |
case ${TP_DOMAIN} in |
||||
*"github.io"*) |
*"github.io"*) |
||||
echo "Switching to github.io URL style" |
echo "Switching to github.io URL style" |
||||
TP_DOMAIN="${TP_DOMAIN}\/theme.park" |
TP_DOMAIN="${TP_DOMAIN}\/theme.park" |
||||
;; |
;; |
||||
esac |
esac |
||||
|
|
||||
if [[ -z ${TP_THEME} ]]; then |
if [[ -z ${TP_THEME} ]]; then |
||||
echo 'No theme set, defaulting to organizr-dark' |
echo 'No theme set, defaulting to organizr-dark' |
||||
TP_THEME='organizr-dark' |
TP_THEME='organizr-dark' |
||||
fi |
fi |
||||
|
|
||||
# Adding stylesheets |
# Adding stylesheets |
||||
if ! grep -q "${TP_DOMAIN}" /usr/lib/python3/dist-packages/deluge/ui/web/index.html; then |
if ! grep -q "${TP_DOMAIN}" /usr/lib/python3/dist-packages/deluge/ui/web/index.html; then |
||||
echo '---------------------------' |
echo '---------------------------' |
||||
echo '| Adding the stylesheet |' |
echo '| Adding the stylesheet |' |
||||
echo '---------------------------' |
echo '---------------------------' |
||||
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/themes\/deluge\/deluge-base.css'><\/head> /g" /usr/lib/python3/dist-packages/deluge/ui/web/index.html |
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/themes\/deluge\/deluge-base.css'><\/head> /g" /usr/lib/python3/dist-packages/deluge/ui/web/index.html |
||||
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/variables\/${TP_THEME}.css'><\/head> /g" /usr/lib/python3/dist-packages/deluge/ui/web/index.html |
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/variables\/${TP_THEME}.css'><\/head> /g" /usr/lib/python3/dist-packages/deluge/ui/web/index.html |
||||
printf 'Stylesheet set to %s\n' "${TP_THEME} |
printf 'Stylesheet set to %s\n' "${TP_THEME} |
||||
" |
" |
||||
fi |
fi |
@ -1,39 +1,39 @@ |
|||||
#!/usr/bin/with-contenv bash |
#!/usr/bin/with-contenv bash |
||||
|
|
||||
echo '-------------------------' |
echo '-------------------------' |
||||
echo '| Emby theme.park Mod |' |
echo '| Emby theme.park Mod |' |
||||
echo '-------------------------' |
echo '-------------------------' |
||||
|
|
||||
# Display variables for troubleshooting |
# Display variables for troubleshooting |
||||
echo -e "Variables set:\\n\ |
echo -e "Variables set:\\n\ |
||||
'TP_DOMAIN'=${TP_DOMAIN}\\n\ |
'TP_DOMAIN'=${TP_DOMAIN}\\n\ |
||||
'TP_THEME'=${TP_THEME}\\n" |
'TP_THEME'=${TP_THEME}\\n" |
||||
|
|
||||
# Set default |
# Set default |
||||
if [[ -z ${TP_DOMAIN} ]]; then |
if [[ -z ${TP_DOMAIN} ]]; then |
||||
echo 'No domain set, defaulting to theme-park.dev' |
echo 'No domain set, defaulting to theme-park.dev' |
||||
TP_DOMAIN='theme-park.dev' |
TP_DOMAIN='theme-park.dev' |
||||
fi |
fi |
||||
|
|
||||
case ${TP_DOMAIN} in |
case ${TP_DOMAIN} in |
||||
*"github.io"*) |
*"github.io"*) |
||||
echo "Switching to github.io URL style" |
echo "Switching to github.io URL style" |
||||
TP_DOMAIN="${TP_DOMAIN}\/theme.park" |
TP_DOMAIN="${TP_DOMAIN}\/theme.park" |
||||
;; |
;; |
||||
esac |
esac |
||||
|
|
||||
if [[ -z ${TP_THEME} ]]; then |
if [[ -z ${TP_THEME} ]]; then |
||||
echo 'No theme set, defaulting to organizr-dark' |
echo 'No theme set, defaulting to organizr-dark' |
||||
TP_THEME='organizr-dark' |
TP_THEME='organizr-dark' |
||||
fi |
fi |
||||
|
|
||||
# Adding stylesheets |
# Adding stylesheets |
||||
if ! grep -q "${TP_DOMAIN}" /app/emby/dashboard-ui/index.html; then |
if ! grep -q "${TP_DOMAIN}" /app/emby/dashboard-ui/index.html; then |
||||
echo '---------------------------' |
echo '---------------------------' |
||||
echo '| Adding the stylesheet |' |
echo '| Adding the stylesheet |' |
||||
echo '---------------------------' |
echo '---------------------------' |
||||
sed -i "s/<\/body>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/themes\/emby\/emby-base.css'><\/body> /g" /app/emby/dashboard-ui/index.html |
sed -i "s/<\/body>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/themes\/emby\/emby-base.css'><\/body> /g" /app/emby/dashboard-ui/index.html |
||||
sed -i "s/<\/body>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/variables\/${TP_THEME}.css'><\/body> /g" /app/emby/dashboard-ui/index.html |
sed -i "s/<\/body>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/variables\/${TP_THEME}.css'><\/body> /g" /app/emby/dashboard-ui/index.html |
||||
printf 'Stylesheet set to %s\n' "${TP_THEME} |
printf 'Stylesheet set to %s\n' "${TP_THEME} |
||||
" |
" |
||||
fi |
fi |
||||
|
@ -1,45 +1,45 @@ |
|||||
#!/usr/bin/with-contenv bash |
#!/usr/bin/with-contenv bash |
||||
|
|
||||
echo '---------------------------' |
echo '---------------------------' |
||||
echo '| Jackett theme.park Mod |' |
echo '| Jackett theme.park Mod |' |
||||
echo '---------------------------' |
echo '---------------------------' |
||||
|
|
||||
# Display variables for troubleshooting |
# Display variables for troubleshooting |
||||
echo -e "Variables set:\\n\ |
echo -e "Variables set:\\n\ |
||||
'TP_DOMAIN'=${TP_DOMAIN}\\n\ |
'TP_DOMAIN'=${TP_DOMAIN}\\n\ |
||||
'TP_THEME'=${TP_THEME}\\n" |
'TP_THEME'=${TP_THEME}\\n" |
||||
|
|
||||
APP_FILEPATH='/app/Jackett/Content/index.html' |
APP_FILEPATH='/app/Jackett/Content/index.html' |
||||
if [ "${TP_HOTIO}" = true ]; then |
if [ "${TP_HOTIO}" = true ]; then |
||||
echo 'Changing to Hotio file path!' |
echo 'Changing to Hotio file path!' |
||||
APP_FILEPATH='/app/Content/index.html' |
APP_FILEPATH='/app/Content/index.html' |
||||
fi |
fi |
||||
|
|
||||
# Set default |
# Set default |
||||
if [[ -z ${TP_DOMAIN} ]]; then |
if [[ -z ${TP_DOMAIN} ]]; then |
||||
echo 'No domain set, defaulting to theme-park.dev' |
echo 'No domain set, defaulting to theme-park.dev' |
||||
TP_DOMAIN='theme-park.dev' |
TP_DOMAIN='theme-park.dev' |
||||
fi |
fi |
||||
|
|
||||
case ${TP_DOMAIN} in |
case ${TP_DOMAIN} in |
||||
*"github.io"*) |
*"github.io"*) |
||||
echo "Switching to github.io URL style" |
echo "Switching to github.io URL style" |
||||
TP_DOMAIN="${TP_DOMAIN}\/theme.park" |
TP_DOMAIN="${TP_DOMAIN}\/theme.park" |
||||
;; |
;; |
||||
esac |
esac |
||||
|
|
||||
if [[ -z ${TP_THEME} ]]; then |
if [[ -z ${TP_THEME} ]]; then |
||||
echo 'No theme set, defaulting to organizr-dark' |
echo 'No theme set, defaulting to organizr-dark' |
||||
TP_THEME='organizr-dark' |
TP_THEME='organizr-dark' |
||||
fi |
fi |
||||
|
|
||||
# Adding stylesheets |
# Adding stylesheets |
||||
if ! grep -q "${TP_DOMAIN}" "${APP_FILEPATH}"; then |
if ! grep -q "${TP_DOMAIN}" "${APP_FILEPATH}"; then |
||||
echo '---------------------------' |
echo '---------------------------' |
||||
echo '| Adding the stylesheet |' |
echo '| Adding the stylesheet |' |
||||
echo '---------------------------' |
echo '---------------------------' |
||||
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/themes\/jackett\/jackett-base.css'><\/head> /g" "${APP_FILEPATH}" |
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/themes\/jackett\/jackett-base.css'><\/head> /g" "${APP_FILEPATH}" |
||||
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/variables\/${TP_THEME}.css'><\/head> /g" "${APP_FILEPATH}" |
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/variables\/${TP_THEME}.css'><\/head> /g" "${APP_FILEPATH}" |
||||
printf 'Stylesheet set to %s\n' "${TP_THEME} |
printf 'Stylesheet set to %s\n' "${TP_THEME} |
||||
" |
" |
||||
fi |
fi |
@ -1,39 +1,39 @@ |
|||||
#!/usr/bin/with-contenv bash |
#!/usr/bin/with-contenv bash |
||||
|
|
||||
echo '-----------------------------' |
echo '-----------------------------' |
||||
echo '| Jellyfin theme.park Mod |' |
echo '| Jellyfin theme.park Mod |' |
||||
echo '-----------------------------' |
echo '-----------------------------' |
||||
|
|
||||
# Display variables for troubleshooting |
# Display variables for troubleshooting |
||||
echo -e "Variables set:\\n\ |
echo -e "Variables set:\\n\ |
||||
'TP_DOMAIN'=${TP_DOMAIN}\\n\ |
'TP_DOMAIN'=${TP_DOMAIN}\\n\ |
||||
'TP_THEME'=${TP_THEME}\\n" |
'TP_THEME'=${TP_THEME}\\n" |
||||
|
|
||||
# Set default |
# Set default |
||||
if [[ -z ${TP_DOMAIN} ]]; then |
if [[ -z ${TP_DOMAIN} ]]; then |
||||
echo 'No domain set, defaulting to theme-park.dev' |
echo 'No domain set, defaulting to theme-park.dev' |
||||
TP_DOMAIN='theme-park.dev' |
TP_DOMAIN='theme-park.dev' |
||||
fi |
fi |
||||
|
|
||||
case ${TP_DOMAIN} in |
case ${TP_DOMAIN} in |
||||
*"github.io"*) |
*"github.io"*) |
||||
echo "Switching to github.io URL style" |
echo "Switching to github.io URL style" |
||||
TP_DOMAIN="${TP_DOMAIN}\/theme.park" |
TP_DOMAIN="${TP_DOMAIN}\/theme.park" |
||||
;; |
;; |
||||
esac |
esac |
||||
|
|
||||
if [[ -z ${TP_THEME} ]]; then |
if [[ -z ${TP_THEME} ]]; then |
||||
echo 'No theme set, defaulting to organizr-dark' |
echo 'No theme set, defaulting to organizr-dark' |
||||
TP_THEME='organizr-dark' |
TP_THEME='organizr-dark' |
||||
fi |
fi |
||||
|
|
||||
# Adding stylesheets |
# Adding stylesheets |
||||
if ! grep -q "${TP_DOMAIN}" /usr/share/jellyfin/web/index.html; then |
if ! grep -q "${TP_DOMAIN}" /usr/share/jellyfin/web/index.html; then |
||||
echo '---------------------------' |
echo '---------------------------' |
||||
echo '| Adding the stylesheet |' |
echo '| Adding the stylesheet |' |
||||
echo '---------------------------' |
echo '---------------------------' |
||||
sed -i "s/<\/body>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/themes\/jellyfin\/jellyfin-base.css'><\/body> /g" /usr/share/jellyfin/web/index.html |
sed -i "s/<\/body>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/themes\/jellyfin\/jellyfin-base.css'><\/body> /g" /usr/share/jellyfin/web/index.html |
||||
sed -i "s/<\/body>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/variables\/${TP_THEME}.css'><\/body> /g" /usr/share/jellyfin/web/index.html |
sed -i "s/<\/body>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/variables\/${TP_THEME}.css'><\/body> /g" /usr/share/jellyfin/web/index.html |
||||
printf 'Stylesheet set to %s\n' "${TP_THEME} |
printf 'Stylesheet set to %s\n' "${TP_THEME} |
||||
" |
" |
||||
fi |
fi |
@ -1,39 +1,39 @@ |
|||||
#!/usr/bin/with-contenv bash |
#!/usr/bin/with-contenv bash |
||||
|
|
||||
echo '----------------------------------' |
echo '----------------------------------' |
||||
echo '| Lazylibrarian theme.park Mod |' |
echo '| Lazylibrarian theme.park Mod |' |
||||
echo '----------------------------------' |
echo '----------------------------------' |
||||
|
|
||||
# Display variables for troubleshooting |
# Display variables for troubleshooting |
||||
echo -e "Variables set:\\n\ |
echo -e "Variables set:\\n\ |
||||
'TP_DOMAIN'=${TP_DOMAIN}\\n\ |
'TP_DOMAIN'=${TP_DOMAIN}\\n\ |
||||
'TP_THEME'=${TP_THEME}\\n" |
'TP_THEME'=${TP_THEME}\\n" |
||||
|
|
||||
# Set default |
# Set default |
||||
if [[ -z ${TP_DOMAIN} ]]; then |
if [[ -z ${TP_DOMAIN} ]]; then |
||||
echo 'No domain set, defaulting to theme-park.dev' |
echo 'No domain set, defaulting to theme-park.dev' |
||||
TP_DOMAIN='theme-park.dev' |
TP_DOMAIN='theme-park.dev' |
||||
fi |
fi |
||||
|
|
||||
case ${TP_DOMAIN} in |
case ${TP_DOMAIN} in |
||||
*"github.io"*) |
*"github.io"*) |
||||
echo "Switching to github.io URL style" |
echo "Switching to github.io URL style" |
||||
TP_DOMAIN="${TP_DOMAIN}\/theme.park" |
TP_DOMAIN="${TP_DOMAIN}\/theme.park" |
||||
;; |
;; |
||||
esac |
esac |
||||
|
|
||||
if [[ -z ${TP_THEME} ]]; then |
if [[ -z ${TP_THEME} ]]; then |
||||
echo 'No theme set, defaulting to organizr-dark' |
echo 'No theme set, defaulting to organizr-dark' |
||||
TP_THEME='organizr-dark' |
TP_THEME='organizr-dark' |
||||
fi |
fi |
||||
|
|
||||
# Adding stylesheets |
# Adding stylesheets |
||||
if ! grep -q "${TP_DOMAIN}" /app/lazylibrarian/data/interfaces/bookstrap/base.html; then |
if ! grep -q "${TP_DOMAIN}" /app/lazylibrarian/data/interfaces/bookstrap/base.html; then |
||||
echo '---------------------------' |
echo '---------------------------' |
||||
echo '| Adding the stylesheet |' |
echo '| Adding the stylesheet |' |
||||
echo '---------------------------' |
echo '---------------------------' |
||||
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/themes\/lazylibrarian\/lazylibrarian-base.css'><\/head> /g" /app/lazylibrarian/data/interfaces/bookstrap/base.html |
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/themes\/lazylibrarian\/lazylibrarian-base.css'><\/head> /g" /app/lazylibrarian/data/interfaces/bookstrap/base.html |
||||
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/variables\/${TP_THEME}.css'><\/head> /g" /app/lazylibrarian/data/interfaces/bookstrap/base.html |
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/variables\/${TP_THEME}.css'><\/head> /g" /app/lazylibrarian/data/interfaces/bookstrap/base.html |
||||
printf 'Stylesheet set to %s\n' "${TP_THEME} |
printf 'Stylesheet set to %s\n' "${TP_THEME} |
||||
" |
" |
||||
fi |
fi |
@ -1,39 +1,39 @@ |
|||||
#!/usr/bin/with-contenv bash |
#!/usr/bin/with-contenv bash |
||||
|
|
||||
echo '-------------------------------' |
echo '-------------------------------' |
||||
echo '| Librespeed theme.park Mod |' |
echo '| Librespeed theme.park Mod |' |
||||
echo '-------------------------------' |
echo '-------------------------------' |
||||
|
|
||||
# Display variables for troubleshooting |
# Display variables for troubleshooting |
||||
echo -e "Variables set:\\n\ |
echo -e "Variables set:\\n\ |
||||
'TP_DOMAIN'=${TP_DOMAIN}\\n\ |
'TP_DOMAIN'=${TP_DOMAIN}\\n\ |
||||
'TP_THEME'=${TP_THEME}\\n" |
'TP_THEME'=${TP_THEME}\\n" |
||||
|
|
||||
# Set default |
# Set default |
||||
if [[ -z ${TP_DOMAIN} ]]; then |
if [[ -z ${TP_DOMAIN} ]]; then |
||||
echo 'No domain set, defaulting to theme-park.dev' |
echo 'No domain set, defaulting to theme-park.dev' |
||||
TP_DOMAIN='theme-park.dev' |
TP_DOMAIN='theme-park.dev' |
||||
fi |
fi |
||||
|
|
||||
case ${TP_DOMAIN} in |
case ${TP_DOMAIN} in |
||||
*"github.io"*) |
*"github.io"*) |
||||
echo "Switching to github.io URL style" |
echo "Switching to github.io URL style" |
||||
TP_DOMAIN="${TP_DOMAIN}\/theme.park" |
TP_DOMAIN="${TP_DOMAIN}\/theme.park" |
||||
;; |
;; |
||||
esac |
esac |
||||
|
|
||||
if [[ -z ${TP_THEME} ]]; then |
if [[ -z ${TP_THEME} ]]; then |
||||
echo 'No theme set, defaulting to organizr-dark' |
echo 'No theme set, defaulting to organizr-dark' |
||||
TP_THEME='organizr-dark' |
TP_THEME='organizr-dark' |
||||
fi |
fi |
||||
|
|
||||
# Adding stylesheets |
# Adding stylesheets |
||||
if ! grep -q "${TP_DOMAIN}" /usr/share/webapps/librespeed/index.html; then |
if ! grep -q "${TP_DOMAIN}" /usr/share/webapps/librespeed/index.html; then |
||||
echo '---------------------------' |
echo '---------------------------' |
||||
echo '| Adding the stylesheet |' |
echo '| Adding the stylesheet |' |
||||
echo '---------------------------' |
echo '---------------------------' |
||||
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/themes\/librespeed\/librespeed-base.css'><\/head> /g" /usr/share/webapps/librespeed/index.html |
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/themes\/librespeed\/librespeed-base.css'><\/head> /g" /usr/share/webapps/librespeed/index.html |
||||
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/variables\/${TP_THEME}.css'><\/head> /g" /usr/share/webapps/librespeed/index.html |
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/variables\/${TP_THEME}.css'><\/head> /g" /usr/share/webapps/librespeed/index.html |
||||
printf 'Stylesheet set to %s\n' "${TP_THEME} |
printf 'Stylesheet set to %s\n' "${TP_THEME} |
||||
" |
" |
||||
fi |
fi |
@ -1,50 +1,50 @@ |
|||||
#!/usr/bin/with-contenv bash |
#!/usr/bin/with-contenv bash |
||||
|
|
||||
echo '-------------------------' |
echo '-------------------------' |
||||
echo '| Plex theme.park Mod |' |
echo '| Plex theme.park Mod |' |
||||
echo '-------------------------' |
echo '-------------------------' |
||||
|
|
||||
# Display variables for troubleshooting |
# Display variables for troubleshooting |
||||
echo -e "Variables set:\\n\ |
echo -e "Variables set:\\n\ |
||||
'TP_DOMAIN'=${TP_DOMAIN}\\n\ |
'TP_DOMAIN'=${TP_DOMAIN}\\n\ |
||||
'TP_THEME'=${TP_THEME}\\n" |
'TP_THEME'=${TP_THEME}\\n" |
||||
|
|
||||
APP_FILEPATH='' |
APP_FILEPATH='' |
||||
if [ "${TP_HOTIO}" = true ]; then |
if [ "${TP_HOTIO}" = true ]; then |
||||
echo 'Changing to Hotio file path!' |
echo 'Changing to Hotio file path!' |
||||
APP_FILEPATH='/app' |
APP_FILEPATH='/app' |
||||
fi |
fi |
||||
|
|
||||
# Set default |
# Set default |
||||
if [[ -z ${TP_DOMAIN} ]]; then |
if [[ -z ${TP_DOMAIN} ]]; then |
||||
echo 'No domain set, defaulting to theme-park.dev' |
echo 'No domain set, defaulting to theme-park.dev' |
||||
TP_DOMAIN='theme-park.dev' |
TP_DOMAIN='theme-park.dev' |
||||
fi |
fi |
||||
|
|
||||
case ${TP_DOMAIN} in |
case ${TP_DOMAIN} in |
||||
*"github.io"*) |
*"github.io"*) |
||||
echo "Switching to github.io URL style" |
echo "Switching to github.io URL style" |
||||
TP_DOMAIN="${TP_DOMAIN}\/theme.park" |
TP_DOMAIN="${TP_DOMAIN}\/theme.park" |
||||
;; |
;; |
||||
esac |
esac |
||||
|
|
||||
if [[ -z ${TP_THEME} ]]; then |
if [[ -z ${TP_THEME} ]]; then |
||||
echo 'No theme set, defaulting to organizr-dark' |
echo 'No theme set, defaulting to organizr-dark' |
||||
TP_THEME='organizr-dark' |
TP_THEME='organizr-dark' |
||||
fi |
fi |
||||
|
|
||||
# Adding stylesheets |
# Adding stylesheets |
||||
if ! grep -q "${TP_DOMAIN}" "${APP_FILEPATH}"; then |
if ! grep -q "${TP_DOMAIN}" "${APP_FILEPATH}"; then |
||||
echo '---------------------------' |
echo '---------------------------' |
||||
echo '| Adding the stylesheet |' |
echo '| Adding the stylesheet |' |
||||
echo '---------------------------' |
echo '---------------------------' |
||||
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/themes\/plex\/plex-base.css'><\/head> /g" "${APP_FILEPATH}"/usr/lib/plexmediaserver/Resources/Plug-ins-*/WebClient.bundle/Contents/Resources/index.html |
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/themes\/plex\/plex-base.css'><\/head> /g" "${APP_FILEPATH}"/usr/lib/plexmediaserver/Resources/Plug-ins-*/WebClient.bundle/Contents/Resources/index.html |
||||
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/variables\/${TP_THEME}.css'><\/head> /g" "${APP_FILEPATH}"/usr/lib/plexmediaserver/Resources/Plug-ins-*/WebClient.bundle/Contents/Resources/index.html |
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/variables\/${TP_THEME}.css'><\/head> /g" "${APP_FILEPATH}"/usr/lib/plexmediaserver/Resources/Plug-ins-*/WebClient.bundle/Contents/Resources/index.html |
||||
printf 'Stylesheet set to %s\n' "${TP_THEME}" |
printf 'Stylesheet set to %s\n' "${TP_THEME}" |
||||
if [[ -n ${TP_ADDON} ]]; then |
if [[ -n ${TP_ADDON} ]]; then |
||||
for addon in $(echo "$TP_ADDON" | tr "|" " "); do |
for addon in $(echo "$TP_ADDON" | tr "|" " "); do |
||||
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/addons\/plex\/${addon}\/${addon}.css'><\/head> /g" "${APP_FILEPATH}"/usr/lib/plexmediaserver/Resources/Plug-ins-*/WebClient.bundle/Contents/Resources/index.html |
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/addons\/plex\/${addon}\/${addon}.css'><\/head> /g" "${APP_FILEPATH}"/usr/lib/plexmediaserver/Resources/Plug-ins-*/WebClient.bundle/Contents/Resources/index.html |
||||
printf 'Added custom addon: %s\n\n' "${addon}" |
printf 'Added custom addon: %s\n\n' "${addon}" |
||||
done |
done |
||||
fi |
fi |
||||
fi |
fi |
@ -1,117 +1,117 @@ |
|||||
#!/usr/bin/with-contenv bash |
#!/usr/bin/with-contenv bash |
||||
|
|
||||
echo '------------------------------' |
echo '------------------------------' |
||||
echo '| qBittorrent theme.park Mod |' |
echo '| qBittorrent theme.park Mod |' |
||||
echo '------------------------------' |
echo '------------------------------' |
||||
|
|
||||
APP_FILEPATH='/config/qBittorrent/qBittorrent.conf' |
APP_FILEPATH='/config/qBittorrent/qBittorrent.conf' |
||||
if [ "${TP_HOTIO}" = true ]; then |
if [ "${TP_HOTIO}" = true ]; then |
||||
echo 'Changing to Hotio file path!' |
echo 'Changing to Hotio file path!' |
||||
APP_FILEPATH='/config/config/qBittorrent.conf' |
APP_FILEPATH='/config/config/qBittorrent.conf' |
||||
fi |
fi |
||||
|
|
||||
# Backup config |
# Backup config |
||||
if [[ ! -f "${APP_FILEPATH}.bak" ]]; then |
if [[ ! -f "${APP_FILEPATH}.bak" ]]; then |
||||
echo "Creating qBittorrent.conf backup in /config." |
echo "Creating qBittorrent.conf backup in /config." |
||||
cp -p ${APP_FILEPATH} "${APP_FILEPATH}.bak" |
cp -p ${APP_FILEPATH} "${APP_FILEPATH}.bak" |
||||
fi |
fi |
||||
|
|
||||
# Restore qBittorrent.conf |
# Restore qBittorrent.conf |
||||
if [ "${TP_DISABLE_THEME}" = true ]; then |
if [ "${TP_DISABLE_THEME}" = true ]; then |
||||
echo "Restoring backup of qBittorrent.conf" |
echo "Restoring backup of qBittorrent.conf" |
||||
sed -i "s/WebUI\\\AlternativeUIEnabled=.*$/WebUI\\\AlternativeUIEnabled=false/g" "${APP_FILEPATH}"; |
sed -i "s/WebUI\\\AlternativeUIEnabled=.*$/WebUI\\\AlternativeUIEnabled=false/g" "${APP_FILEPATH}"; |
||||
exit 0 |
exit 0 |
||||
fi |
fi |
||||
|
|
||||
if ! [[ -x "$(command -v svn)" ]]; then |
if ! [[ -x "$(command -v svn)" ]]; then |
||||
echo '--------------------------' |
echo '--------------------------' |
||||
echo '| Installing svn package |' |
echo '| Installing svn package |' |
||||
echo '--------------------------' |
echo '--------------------------' |
||||
apt-get update && \ |
apt-get update && \ |
||||
apt-get install -y subversion |
apt-get install -y subversion |
||||
fi |
fi |
||||
|
|
||||
# Display variables for troubleshooting |
# Display variables for troubleshooting |
||||
echo -e "Variables set:\\n\ |
echo -e "Variables set:\\n\ |
||||
'APP_FILEPATH'=${APP_FILEPATH}\\n\ |
'APP_FILEPATH'=${APP_FILEPATH}\\n\ |
||||
'TP_DISABLE_THEME'=${TP_DISABLE_THEME}\\n\ |
'TP_DISABLE_THEME'=${TP_DISABLE_THEME}\\n\ |
||||
'TP_HOTIO'=${TP_HOTIO}\\n\ |
'TP_HOTIO'=${TP_HOTIO}\\n\ |
||||
'TP_DOMAIN'=${TP_DOMAIN}\\n\ |
'TP_DOMAIN'=${TP_DOMAIN}\\n\ |
||||
'TP_THEME'=${TP_THEME}\\n" |
'TP_THEME'=${TP_THEME}\\n" |
||||
|
|
||||
# Set default |
# Set default |
||||
if [[ -z ${TP_DOMAIN} ]]; then |
if [[ -z ${TP_DOMAIN} ]]; then |
||||
echo 'No domain set, defaulting to theme-park.dev' |
echo 'No domain set, defaulting to theme-park.dev' |
||||
TP_DOMAIN='theme-park.dev' |
TP_DOMAIN='theme-park.dev' |
||||
fi |
fi |
||||
|
|
||||
case ${TP_DOMAIN} in |
case ${TP_DOMAIN} in |
||||
*"github.io"*) |
*"github.io"*) |
||||
echo "Switching to github.io URL style" |
echo "Switching to github.io URL style" |
||||
TP_DOMAIN="${TP_DOMAIN}\/theme.park" |
TP_DOMAIN="${TP_DOMAIN}\/theme.park" |
||||
;; |
;; |
||||
esac |
esac |
||||
|
|
||||
if [[ -z ${TP_THEME} ]]; then |
if [[ -z ${TP_THEME} ]]; then |
||||
echo 'No theme set, defaulting to organizr-dark' |
echo 'No theme set, defaulting to organizr-dark' |
||||
TP_THEME='organizr-dark' |
TP_THEME='organizr-dark' |
||||
fi |
fi |
||||
|
|
||||
# Downloading fresh webui files from source. |
# Downloading fresh webui files from source. |
||||
if [[ ! -d /themepark ]]; then |
if [[ ! -d /themepark ]]; then |
||||
echo '---------------------------------------' |
echo '---------------------------------------' |
||||
echo '| Downloading WebUI files from github |' |
echo '| Downloading WebUI files from github |' |
||||
echo '---------------------------------------' |
echo '---------------------------------------' |
||||
printf '\nDownloading qBittorrent webui to "/themepark"..please wait\n' |
printf '\nDownloading qBittorrent webui to "/themepark"..please wait\n' |
||||
svn export --quiet https://github.com/qbittorrent/qBittorrent/trunk/src/webui/www /themepark |
svn export --quiet https://github.com/qbittorrent/qBittorrent/trunk/src/webui/www /themepark |
||||
printf '\nDownload finished\n\n' |
printf '\nDownload finished\n\n' |
||||
printf '\nDownloading qBittorrent webui icons to "/themepark/xxx"..please wait\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 |
svn export --force --quiet https://github.com/qbittorrent/qBittorrent/trunk/src/icons /temp |
||||
cp -a /temp/. /themepark/public/icons |
cp -a /temp/. /themepark/public/icons |
||||
cp -a /temp/. /themepark/private/icons |
cp -a /temp/. /themepark/private/icons |
||||
rm -rf /temp |
rm -rf /temp |
||||
printf '\nDownload finished\n\n' |
printf '\nDownload finished\n\n' |
||||
fi |
fi |
||||
|
|
||||
sed_file(){ |
sed_file(){ |
||||
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/themes\/qbittorrent\/qbittorrent-base.css'><\/head> /g" $1 |
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/themes\/qbittorrent\/qbittorrent-base.css'><\/head> /g" $1 |
||||
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/variables\/${TP_THEME}.css'><\/head> /g" $1 |
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/variables\/${TP_THEME}.css'><\/head> /g" $1 |
||||
printf 'Stylesheet set to %s on %s\n\n' "${TP_THEME}" "$1" |
printf 'Stylesheet set to %s on %s\n\n' "${TP_THEME}" "$1" |
||||
} |
} |
||||
|
|
||||
# Adding stylesheets |
# Adding stylesheets |
||||
echo '---------------------------------------' |
echo '---------------------------------------' |
||||
echo '| Adding the stylesheet to html files |' |
echo '| Adding the stylesheet to html files |' |
||||
echo '---------------------------------------' |
echo '---------------------------------------' |
||||
if ! grep -q "${TP_DOMAIN}" /themepark/public/index.html; then |
if ! grep -q "${TP_DOMAIN}" /themepark/public/index.html; then |
||||
sed_file /themepark/public/index.html |
sed_file /themepark/public/index.html |
||||
fi |
fi |
||||
|
|
||||
if ! grep -q "${TP_DOMAIN}" /themepark/private/index.html; then |
if ! grep -q "${TP_DOMAIN}" /themepark/private/index.html; then |
||||
find ./themepark/private -type f -iname *.html | while read fname |
find ./themepark/private -type f -iname *.html | while read fname |
||||
do |
do |
||||
sed_file $fname |
sed_file $fname |
||||
done |
done |
||||
fi |
fi |
||||
|
|
||||
if ! grep -q "WebUI\\\RootFolder" "${APP_FILEPATH}"; then |
if ! grep -q "WebUI\\\RootFolder" "${APP_FILEPATH}"; then |
||||
echo '--------------------------------------' |
echo '--------------------------------------' |
||||
echo '| Adding WebUI\RootFolder=/themepark |' |
echo '| Adding WebUI\RootFolder=/themepark |' |
||||
echo '--------------------------------------' |
echo '--------------------------------------' |
||||
sed -i -e '$aWebUI\\RootFolder=/themepark' "${APP_FILEPATH}"; |
sed -i -e '$aWebUI\\RootFolder=/themepark' "${APP_FILEPATH}"; |
||||
fi |
fi |
||||
|
|
||||
if ! grep -q "WebUI\\\AlternativeUIEnabled" "${APP_FILEPATH}"; then |
if ! grep -q "WebUI\\\AlternativeUIEnabled" "${APP_FILEPATH}"; then |
||||
echo '------------------------------------------' |
echo '------------------------------------------' |
||||
echo '| Adding WebUI\AlternativeUIEnabled=true |' |
echo '| Adding WebUI\AlternativeUIEnabled=true |' |
||||
echo '------------------------------------------' |
echo '------------------------------------------' |
||||
sed -i -e '$aWebUI\\AlternativeUIEnabled=true' "${APP_FILEPATH}"; |
sed -i -e '$aWebUI\\AlternativeUIEnabled=true' "${APP_FILEPATH}"; |
||||
fi |
fi |
||||
|
|
||||
if ! grep -q "WebUI\\\RootFolder=/themepark" "${APP_FILEPATH}" || ! grep -q "WebUI\\\AlternativeUIEnabled=true" "${APP_FILEPATH}"; then |
if ! grep -q "WebUI\\\RootFolder=/themepark" "${APP_FILEPATH}" || ! grep -q "WebUI\\\AlternativeUIEnabled=true" "${APP_FILEPATH}"; then |
||||
echo '-------------------------------------------------------' |
echo '-------------------------------------------------------' |
||||
echo '| Updating RootFolder and AlternativeUIEnabled values |' |
echo '| Updating RootFolder and AlternativeUIEnabled values |' |
||||
echo '-------------------------------------------------------' |
echo '-------------------------------------------------------' |
||||
sed -i "s/WebUI\\\AlternativeUIEnabled=.*$/WebUI\\\AlternativeUIEnabled=true/g" "${APP_FILEPATH}"; |
sed -i "s/WebUI\\\AlternativeUIEnabled=.*$/WebUI\\\AlternativeUIEnabled=true/g" "${APP_FILEPATH}"; |
||||
sed -i "s/WebUI\\\RootFolder=.*$/WebUI\\\RootFolder=\/themepark/g" "${APP_FILEPATH}"; |
sed -i "s/WebUI\\\RootFolder=.*$/WebUI\\\RootFolder=\/themepark/g" "${APP_FILEPATH}"; |
||||
fi |
fi |
||||
|
@ -1,39 +1,39 @@ |
|||||
#!/usr/bin/with-contenv bash |
#!/usr/bin/with-contenv bash |
||||
|
|
||||
echo '------------------------------' |
echo '------------------------------' |
||||
echo '| Rutorrent theme.park Mod |' |
echo '| Rutorrent theme.park Mod |' |
||||
echo '------------------------------' |
echo '------------------------------' |
||||
|
|
||||
# Display variables for troubleshooting |
# Display variables for troubleshooting |
||||
echo -e "Variables set:\\n\ |
echo -e "Variables set:\\n\ |
||||
'TP_DOMAIN'=${TP_DOMAIN}\\n\ |
'TP_DOMAIN'=${TP_DOMAIN}\\n\ |
||||
'TP_THEME'=${TP_THEME}\\n" |
'TP_THEME'=${TP_THEME}\\n" |
||||
|
|
||||
# Set default |
# Set default |
||||
if [[ -z ${TP_DOMAIN} ]]; then |
if [[ -z ${TP_DOMAIN} ]]; then |
||||
echo 'No domain set, defaulting to theme-park.dev' |
echo 'No domain set, defaulting to theme-park.dev' |
||||
TP_DOMAIN='theme-park.dev' |
TP_DOMAIN='theme-park.dev' |
||||
fi |
fi |
||||
|
|
||||
case ${TP_DOMAIN} in |
case ${TP_DOMAIN} in |
||||
*"github.io"*) |
*"github.io"*) |
||||
echo "Switching to github.io URL style" |
echo "Switching to github.io URL style" |
||||
TP_DOMAIN="${TP_DOMAIN}\/theme.park" |
TP_DOMAIN="${TP_DOMAIN}\/theme.park" |
||||
;; |
;; |
||||
esac |
esac |
||||
|
|
||||
if [[ -z ${TP_THEME} ]]; then |
if [[ -z ${TP_THEME} ]]; then |
||||
echo 'No theme set, defaulting to organizr-dark' |
echo 'No theme set, defaulting to organizr-dark' |
||||
TP_THEME='organizr-dark' |
TP_THEME='organizr-dark' |
||||
fi |
fi |
||||
|
|
||||
# Adding stylesheets |
# Adding stylesheets |
||||
if ! grep -q "${TP_DOMAIN}" /app/rutorrent/index.html; then |
if ! grep -q "${TP_DOMAIN}" /app/rutorrent/index.html; then |
||||
echo '---------------------------' |
echo '---------------------------' |
||||
echo '| Adding the stylesheet |' |
echo '| Adding the stylesheet |' |
||||
echo '---------------------------' |
echo '---------------------------' |
||||
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/themes\/rutorrent\/rutorrent-base.css'><\/head> /g" /app/rutorrent/index.html |
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/themes\/rutorrent\/rutorrent-base.css'><\/head> /g" /app/rutorrent/index.html |
||||
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/variables\/${TP_THEME}.css'><\/head> /g" /app/rutorrent/index.html |
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/variables\/${TP_THEME}.css'><\/head> /g" /app/rutorrent/index.html |
||||
printf 'Stylesheet set to %s\n' "${TP_THEME} |
printf 'Stylesheet set to %s\n' "${TP_THEME} |
||||
" |
" |
||||
fi |
fi |
@ -1,50 +1,50 @@ |
|||||
#!/usr/bin/with-contenv bash |
#!/usr/bin/with-contenv bash |
||||
|
|
||||
echo '----------------------------' |
echo '----------------------------' |
||||
echo '| SABnzbd theme.park Mod |' |
echo '| SABnzbd theme.park Mod |' |
||||
echo '----------------------------' |
echo '----------------------------' |
||||
|
|
||||
# Display variables for troubleshooting |
# Display variables for troubleshooting |
||||
echo -e "Variables set:\\n\ |
echo -e "Variables set:\\n\ |
||||
'TP_DOMAIN'=${TP_DOMAIN}\\n\ |
'TP_DOMAIN'=${TP_DOMAIN}\\n\ |
||||
'TP_THEME'=${TP_THEME}\\n" |
'TP_THEME'=${TP_THEME}\\n" |
||||
|
|
||||
APP_FILEPATH='/app/sabnzbd' |
APP_FILEPATH='/app/sabnzbd' |
||||
if [ "${TP_HOTIO}" = true ]; then |
if [ "${TP_HOTIO}" = true ]; then |
||||
echo 'Changing to Hotio file path!' |
echo 'Changing to Hotio file path!' |
||||
APP_FILEPATH='/app' |
APP_FILEPATH='/app' |
||||
fi |
fi |
||||
|
|
||||
# Set default |
# Set default |
||||
if [[ -z ${TP_DOMAIN} ]]; then |
if [[ -z ${TP_DOMAIN} ]]; then |
||||
echo 'No domain set, defaulting to theme-park.dev' |
echo 'No domain set, defaulting to theme-park.dev' |
||||
TP_DOMAIN='theme-park.dev' |
TP_DOMAIN='theme-park.dev' |
||||
fi |
fi |
||||
|
|
||||
case ${TP_DOMAIN} in |
case ${TP_DOMAIN} in |
||||
*"github.io"*) |
*"github.io"*) |
||||
echo "Switching to github.io URL style" |
echo "Switching to github.io URL style" |
||||
TP_DOMAIN="${TP_DOMAIN}\/theme.park" |
TP_DOMAIN="${TP_DOMAIN}\/theme.park" |
||||
;; |
;; |
||||
esac |
esac |
||||
|
|
||||
if [[ -z ${TP_THEME} ]]; then |
if [[ -z ${TP_THEME} ]]; then |
||||
echo 'No theme set, defaulting to organizr-dark' |
echo 'No theme set, defaulting to organizr-dark' |
||||
TP_THEME='organizr-dark' |
TP_THEME='organizr-dark' |
||||
fi |
fi |
||||
|
|
||||
# Adding stylesheets |
# Adding stylesheets |
||||
if ! grep -q "${TP_DOMAIN}" "${APP_FILEPATH}/interfaces/Glitter/templates/main.tmpl"; then |
if ! grep -q "${TP_DOMAIN}" "${APP_FILEPATH}/interfaces/Glitter/templates/main.tmpl"; then |
||||
echo '---------------------------' |
echo '---------------------------' |
||||
echo '| Adding the stylesheet |' |
echo '| Adding the stylesheet |' |
||||
echo '---------------------------' |
echo '---------------------------' |
||||
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/themes\/sabnzbd\/sabnzbd-base.css'><\/head> /g" "${APP_FILEPATH}/interfaces/Glitter/templates/main.tmpl" |
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/themes\/sabnzbd\/sabnzbd-base.css'><\/head> /g" "${APP_FILEPATH}/interfaces/Glitter/templates/main.tmpl" |
||||
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/themes\/sabnzbd\/sabnzbd-base.css'><\/head> /g" "${APP_FILEPATH}/interfaces/Config/templates/_inc_header_uc.tmpl" |
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/themes\/sabnzbd\/sabnzbd-base.css'><\/head> /g" "${APP_FILEPATH}/interfaces/Config/templates/_inc_header_uc.tmpl" |
||||
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/themes\/sabnzbd\/sabnzbd-base.css'><\/head> /g" "${APP_FILEPATH}/interfaces/Config/templates/login/main.tmpl" |
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/themes\/sabnzbd\/sabnzbd-base.css'><\/head> /g" "${APP_FILEPATH}/interfaces/Config/templates/login/main.tmpl" |
||||
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/themes\/sabnzbd\/sabnzbd-base.css'><\/head> /g" "${APP_FILEPATH}/interfaces/wizard/inc_top.tmpl" |
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/themes\/sabnzbd\/sabnzbd-base.css'><\/head> /g" "${APP_FILEPATH}/interfaces/wizard/inc_top.tmpl" |
||||
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/variables\/${TP_THEME}.css'><\/head> /g" "${APP_FILEPATH}/interfaces/Glitter/templates/main.tmpl" |
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/variables\/${TP_THEME}.css'><\/head> /g" "${APP_FILEPATH}/interfaces/Glitter/templates/main.tmpl" |
||||
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/variables\/${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}\/CSS\/variables\/${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}\/CSS\/variables\/${TP_THEME}.css'><\/head> /g" "${APP_FILEPATH}/interfaces/Config/templates/login/main.tmpl" |
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/variables\/${TP_THEME}.css'><\/head> /g" "${APP_FILEPATH}/interfaces/Config/templates/login/main.tmpl" |
||||
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/variables\/${TP_THEME}.css'><\/head> /g" "${APP_FILEPATH}/interfaces/wizard/inc_top.tmpl" |
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/variables\/${TP_THEME}.css'><\/head> /g" "${APP_FILEPATH}/interfaces/wizard/inc_top.tmpl" |
||||
printf 'Stylesheet set to %s\n' "${TP_THEME}" |
printf 'Stylesheet set to %s\n' "${TP_THEME}" |
||||
fi |
fi |
@ -1,39 +1,39 @@ |
|||||
#!/usr/bin/with-contenv bash |
#!/usr/bin/with-contenv bash |
||||
|
|
||||
echo '-------------------------------' |
echo '-------------------------------' |
||||
echo '| Synclounge theme.park Mod |' |
echo '| Synclounge theme.park Mod |' |
||||
echo '-------------------------------' |
echo '-------------------------------' |
||||
|
|
||||
# Display variables for troubleshooting |
# Display variables for troubleshooting |
||||
echo -e "Variables set:\\n\ |
echo -e "Variables set:\\n\ |
||||
'TP_DOMAIN'=${TP_DOMAIN}\\n\ |
'TP_DOMAIN'=${TP_DOMAIN}\\n\ |
||||
'TP_THEME'=${TP_THEME}\\n" |
'TP_THEME'=${TP_THEME}\\n" |
||||
|
|
||||
# Set default |
# Set default |
||||
if [[ -z ${TP_DOMAIN} ]]; then |
if [[ -z ${TP_DOMAIN} ]]; then |
||||
echo 'No domain set, defaulting to theme-park.dev' |
echo 'No domain set, defaulting to theme-park.dev' |
||||
TP_DOMAIN='theme-park.dev' |
TP_DOMAIN='theme-park.dev' |
||||
fi |
fi |
||||
|
|
||||
case ${TP_DOMAIN} in |
case ${TP_DOMAIN} in |
||||
*"github.io"*) |
*"github.io"*) |
||||
echo "Switching to github.io URL style" |
echo "Switching to github.io URL style" |
||||
TP_DOMAIN="${TP_DOMAIN}\/theme.park" |
TP_DOMAIN="${TP_DOMAIN}\/theme.park" |
||||
;; |
;; |
||||
esac |
esac |
||||
|
|
||||
if [[ -z ${TP_THEME} ]]; then |
if [[ -z ${TP_THEME} ]]; then |
||||
echo 'No theme set, defaulting to organizr-dark' |
echo 'No theme set, defaulting to organizr-dark' |
||||
TP_THEME='organizr-dark' |
TP_THEME='organizr-dark' |
||||
fi |
fi |
||||
|
|
||||
# Adding stylesheets |
# Adding stylesheets |
||||
if ! grep -q "${TP_DOMAIN}" /usr/lib/node_modules/synclounge/dist/index.html; then |
if ! grep -q "${TP_DOMAIN}" /usr/lib/node_modules/synclounge/dist/index.html; then |
||||
echo '---------------------------' |
echo '---------------------------' |
||||
echo '| Adding the stylesheet |' |
echo '| Adding the stylesheet |' |
||||
echo '---------------------------' |
echo '---------------------------' |
||||
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/themes\/synclounge\/synclounge-base.css'><\/head> /g" /usr/lib/node_modules/synclounge/dist/index.html |
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/themes\/synclounge\/synclounge-base.css'><\/head> /g" /usr/lib/node_modules/synclounge/dist/index.html |
||||
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/variables\/${TP_THEME}.css'><\/head> /g" /usr/lib/node_modules/synclounge/dist/index.html |
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/variables\/${TP_THEME}.css'><\/head> /g" /usr/lib/node_modules/synclounge/dist/index.html |
||||
printf 'Stylesheet set to %s\n' "${TP_THEME} |
printf 'Stylesheet set to %s\n' "${TP_THEME} |
||||
" |
" |
||||
fi |
fi |
@ -1,44 +1,44 @@ |
|||||
#!/usr/bin/with-contenv bash |
#!/usr/bin/with-contenv bash |
||||
|
|
||||
echo '-----------------------------' |
echo '-----------------------------' |
||||
echo '| Tautulli theme.park Mod |' |
echo '| Tautulli theme.park Mod |' |
||||
echo '-----------------------------' |
echo '-----------------------------' |
||||
|
|
||||
# Display variables for troubleshooting |
# Display variables for troubleshooting |
||||
echo -e "Variables set:\\n\ |
echo -e "Variables set:\\n\ |
||||
'TP_DOMAIN'=${TP_DOMAIN}\\n\ |
'TP_DOMAIN'=${TP_DOMAIN}\\n\ |
||||
'TP_THEME'=${TP_THEME}\\n" |
'TP_THEME'=${TP_THEME}\\n" |
||||
|
|
||||
APP_FILEPATH='/app/tautulli/data/interfaces/default/base.html' |
APP_FILEPATH='/app/tautulli/data/interfaces/default/base.html' |
||||
if [ "${TP_HOTIO}" = true ]; then |
if [ "${TP_HOTIO}" = true ]; then |
||||
echo 'Changing to Hotio file path!' |
echo 'Changing to Hotio file path!' |
||||
APP_FILEPATH='/app/data/interfaces/default/base.html' |
APP_FILEPATH='/app/data/interfaces/default/base.html' |
||||
fi |
fi |
||||
|
|
||||
# Set default |
# Set default |
||||
if [[ -z ${TP_DOMAIN} ]]; then |
if [[ -z ${TP_DOMAIN} ]]; then |
||||
echo 'No domain set, defaulting to theme-park.dev' |
echo 'No domain set, defaulting to theme-park.dev' |
||||
TP_DOMAIN='theme-park.dev' |
TP_DOMAIN='theme-park.dev' |
||||
fi |
fi |
||||
|
|
||||
case ${TP_DOMAIN} in |
case ${TP_DOMAIN} in |
||||
*"github.io"*) |
*"github.io"*) |
||||
echo "Switching to github.io URL style" |
echo "Switching to github.io URL style" |
||||
TP_DOMAIN="${TP_DOMAIN}\/theme.park" |
TP_DOMAIN="${TP_DOMAIN}\/theme.park" |
||||
;; |
;; |
||||
esac |
esac |
||||
|
|
||||
if [[ -z ${TP_THEME} ]]; then |
if [[ -z ${TP_THEME} ]]; then |
||||
echo 'No theme set, defaulting to organizr-dark' |
echo 'No theme set, defaulting to organizr-dark' |
||||
TP_THEME='organizr-dark' |
TP_THEME='organizr-dark' |
||||
fi |
fi |
||||
|
|
||||
# Adding stylesheets |
# Adding stylesheets |
||||
if ! grep -q "${TP_DOMAIN}" "${APP_FILEPATH}"; then |
if ! grep -q "${TP_DOMAIN}" "${APP_FILEPATH}"; then |
||||
echo '---------------------------' |
echo '---------------------------' |
||||
echo '| Adding the stylesheet |' |
echo '| Adding the stylesheet |' |
||||
echo '---------------------------' |
echo '---------------------------' |
||||
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/themes\/tautulli\/tautulli-base.css'><\/head> /g" "${APP_FILEPATH}" |
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/themes\/tautulli\/tautulli-base.css'><\/head> /g" "${APP_FILEPATH}" |
||||
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/variables\/${TP_THEME}.css'><\/head> /g" "${APP_FILEPATH}" |
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/variables\/${TP_THEME}.css'><\/head> /g" "${APP_FILEPATH}" |
||||
printf 'Stylesheet set to %s\n' "${TP_THEME}" |
printf 'Stylesheet set to %s\n' "${TP_THEME}" |
||||
fi |
fi |
@ -1,39 +1,39 @@ |
|||||
#!/usr/bin/with-contenv bash |
#!/usr/bin/with-contenv bash |
||||
|
|
||||
echo '-------------------------------' |
echo '-------------------------------' |
||||
echo '| The Lounge theme.park Mod |' |
echo '| The Lounge theme.park Mod |' |
||||
echo '-------------------------------' |
echo '-------------------------------' |
||||
|
|
||||
# Display variables for troubleshooting |
# Display variables for troubleshooting |
||||
echo -e "Variables set:\\n\ |
echo -e "Variables set:\\n\ |
||||
'TP_DOMAIN'=${TP_DOMAIN}\\n\ |
'TP_DOMAIN'=${TP_DOMAIN}\\n\ |
||||
'TP_THEME'=${TP_THEME}\\n" |
'TP_THEME'=${TP_THEME}\\n" |
||||
|
|
||||
# Set default |
# Set default |
||||
if [[ -z ${TP_DOMAIN} ]]; then |
if [[ -z ${TP_DOMAIN} ]]; then |
||||
echo 'No domain set, defaulting to theme-park.dev' |
echo 'No domain set, defaulting to theme-park.dev' |
||||
TP_DOMAIN='theme-park.dev' |
TP_DOMAIN='theme-park.dev' |
||||
fi |
fi |
||||
|
|
||||
case ${TP_DOMAIN} in |
case ${TP_DOMAIN} in |
||||
*"github.io"*) |
*"github.io"*) |
||||
echo "Switching to github.io URL style" |
echo "Switching to github.io URL style" |
||||
TP_DOMAIN="${TP_DOMAIN}\/theme.park" |
TP_DOMAIN="${TP_DOMAIN}\/theme.park" |
||||
;; |
;; |
||||
esac |
esac |
||||
|
|
||||
if [[ -z ${TP_THEME} ]]; then |
if [[ -z ${TP_THEME} ]]; then |
||||
echo 'No theme set, defaulting to organizr-dark' |
echo 'No theme set, defaulting to organizr-dark' |
||||
TP_THEME='organizr-dark' |
TP_THEME='organizr-dark' |
||||
fi |
fi |
||||
|
|
||||
# Adding stylesheets |
# Adding stylesheets |
||||
if ! grep -q "${TP_DOMAIN}" /usr/lib/node_modules/thelounge/client/index.html.tpl; then |
if ! grep -q "${TP_DOMAIN}" /usr/lib/node_modules/thelounge/client/index.html.tpl; then |
||||
echo '---------------------------' |
echo '---------------------------' |
||||
echo '| Adding the stylesheet |' |
echo '| Adding the stylesheet |' |
||||
echo '---------------------------' |
echo '---------------------------' |
||||
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/themes\/thelounge\/thelounge-base.css'><\/head> /g" /usr/lib/node_modules/thelounge/client/index.html.tpl |
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/themes\/thelounge\/thelounge-base.css'><\/head> /g" /usr/lib/node_modules/thelounge/client/index.html.tpl |
||||
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/variables\/${TP_THEME}.css'><\/head> /g" /usr/lib/node_modules/thelounge/client/index.html.tpl |
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/variables\/${TP_THEME}.css'><\/head> /g" /usr/lib/node_modules/thelounge/client/index.html.tpl |
||||
printf 'Stylesheet set to %s\n' "${TP_THEME} |
printf 'Stylesheet set to %s\n' "${TP_THEME} |
||||
" |
" |
||||
fi |
fi |
@ -1,39 +1,39 @@ |
|||||
#!/usr/bin/with-contenv bash |
#!/usr/bin/with-contenv bash |
||||
|
|
||||
echo '---------------------------------' |
echo '---------------------------------' |
||||
echo '| Transmission theme.park Mod |' |
echo '| Transmission theme.park Mod |' |
||||
echo '---------------------------------' |
echo '---------------------------------' |
||||
|
|
||||
# Display variables for troubleshooting |
# Display variables for troubleshooting |
||||
echo -e "Variables set:\\n\ |
echo -e "Variables set:\\n\ |
||||
'TP_DOMAIN'=${TP_DOMAIN}\\n\ |
'TP_DOMAIN'=${TP_DOMAIN}\\n\ |
||||
'TP_THEME'=${TP_THEME}\\n" |
'TP_THEME'=${TP_THEME}\\n" |
||||
|
|
||||
# Set default |
# Set default |
||||
if [[ -z ${TP_DOMAIN} ]]; then |
if [[ -z ${TP_DOMAIN} ]]; then |
||||
echo 'No domain set, defaulting to theme-park.dev' |
echo 'No domain set, defaulting to theme-park.dev' |
||||
TP_DOMAIN='theme-park.dev' |
TP_DOMAIN='theme-park.dev' |
||||
fi |
fi |
||||
|
|
||||
case ${TP_DOMAIN} in |
case ${TP_DOMAIN} in |
||||
*"github.io"*) |
*"github.io"*) |
||||
echo "Switching to github.io URL style" |
echo "Switching to github.io URL style" |
||||
TP_DOMAIN="${TP_DOMAIN}\/theme.park" |
TP_DOMAIN="${TP_DOMAIN}\/theme.park" |
||||
;; |
;; |
||||
esac |
esac |
||||
|
|
||||
if [[ -z ${TP_THEME} ]]; then |
if [[ -z ${TP_THEME} ]]; then |
||||
echo 'No theme set, defaulting to organizr-dark' |
echo 'No theme set, defaulting to organizr-dark' |
||||
TP_THEME='organizr-dark' |
TP_THEME='organizr-dark' |
||||
fi |
fi |
||||
|
|
||||
# Adding stylesheets |
# Adding stylesheets |
||||
if ! grep -q "${TP_DOMAIN}" /usr/share/transmission/web/index.html; then |
if ! grep -q "${TP_DOMAIN}" /usr/share/transmission/web/index.html; then |
||||
echo '---------------------------' |
echo '---------------------------' |
||||
echo '| Adding the stylesheet |' |
echo '| Adding the stylesheet |' |
||||
echo '---------------------------' |
echo '---------------------------' |
||||
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/themes\/transmission\/transmission-base.css'><\/head> /g" /usr/share/transmission/web/index.html |
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/themes\/transmission\/transmission-base.css'><\/head> /g" /usr/share/transmission/web/index.html |
||||
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/variables\/${TP_THEME}.css'><\/head> /g" /usr/share/transmission/web/index.html |
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/variables\/${TP_THEME}.css'><\/head> /g" /usr/share/transmission/web/index.html |
||||
printf 'Stylesheet set to %s\n' "${TP_THEME} |
printf 'Stylesheet set to %s\n' "${TP_THEME} |
||||
" |
" |
||||
fi |
fi |
@ -1,133 +1,133 @@ |
|||||
#!/usr/bin/with-contenv bash |
#!/usr/bin/with-contenv bash |
||||
APP_FILEPATH='/config/qBittorrent/qBittorrent.conf' |
APP_FILEPATH='/config/qBittorrent/qBittorrent.conf' |
||||
INDEX_FILEPATH='/vuetorrent/public/index.html' |
INDEX_FILEPATH='/vuetorrent/public/index.html' |
||||
if [ "${TP_HOTIO}" = true ]; then |
if [ "${TP_HOTIO}" = true ]; then |
||||
echo 'Changing to Hotio file paths!' |
echo 'Changing to Hotio file paths!' |
||||
APP_FILEPATH='/config/config/qBittorrent.conf' |
APP_FILEPATH='/config/config/qBittorrent.conf' |
||||
INDEX_FILEPATH='/app/vuetorrent/public/index.html' |
INDEX_FILEPATH='/app/vuetorrent/public/index.html' |
||||
fi |
fi |
||||
|
|
||||
# Backup config |
# Backup config |
||||
if [[ ! -f "${APP_FILEPATH}.bak" ]]; then |
if [[ ! -f "${APP_FILEPATH}.bak" ]]; then |
||||
echo "Creating qBittorrent.conf backup in /config." |
echo "Creating qBittorrent.conf backup in /config." |
||||
cp -p ${APP_FILEPATH} "${APP_FILEPATH}.bak" |
cp -p ${APP_FILEPATH} "${APP_FILEPATH}.bak" |
||||
fi |
fi |
||||
|
|
||||
# Restore qBittorrent.conf |
# Restore qBittorrent.conf |
||||
if [ "${TP_DISABLE_THEME}" = true ]; then |
if [ "${TP_DISABLE_THEME}" = true ]; then |
||||
echo "Restoring backup of qBittorrent.conf" |
echo "Restoring backup of qBittorrent.conf" |
||||
sed -i "s/WebUI\\\AlternativeUIEnabled=.*$/WebUI\\\AlternativeUIEnabled=false/g" "${APP_FILEPATH}"; |
sed -i "s/WebUI\\\AlternativeUIEnabled=.*$/WebUI\\\AlternativeUIEnabled=false/g" "${APP_FILEPATH}"; |
||||
exit 0 |
exit 0 |
||||
fi |
fi |
||||
|
|
||||
# Display variables for troubleshooting |
# Display variables for troubleshooting |
||||
echo -e "Variables set:\\n\ |
echo -e "Variables set:\\n\ |
||||
'TP_DOMAIN'=${TP_DOMAIN}\\n\ |
'TP_DOMAIN'=${TP_DOMAIN}\\n\ |
||||
'TP_THEME'=${TP_THEME}\\n" |
'TP_THEME'=${TP_THEME}\\n" |
||||
|
|
||||
# Set default |
# Set default |
||||
if [[ -z ${TP_DOMAIN} ]]; then |
if [[ -z ${TP_DOMAIN} ]]; then |
||||
echo 'No domain set, defaulting to theme-park.dev' |
echo 'No domain set, defaulting to theme-park.dev' |
||||
TP_DOMAIN='theme-park.dev' |
TP_DOMAIN='theme-park.dev' |
||||
fi |
fi |
||||
|
|
||||
case ${TP_DOMAIN} in |
case ${TP_DOMAIN} in |
||||
*"github.io"*) |
*"github.io"*) |
||||
echo "Switching to github.io URL style" |
echo "Switching to github.io URL style" |
||||
TP_DOMAIN="${TP_DOMAIN}\/theme.park" |
TP_DOMAIN="${TP_DOMAIN}\/theme.park" |
||||
;; |
;; |
||||
esac |
esac |
||||
|
|
||||
if [[ -z ${TP_THEME} ]]; then |
if [[ -z ${TP_THEME} ]]; then |
||||
echo 'No theme set, defaulting to organizr-dark' |
echo 'No theme set, defaulting to organizr-dark' |
||||
TP_THEME='organizr-dark' |
TP_THEME='organizr-dark' |
||||
fi |
fi |
||||
RELEASE_FILEPATH='/vuetorrent/release.json' |
RELEASE_FILEPATH='/vuetorrent/release.json' |
||||
NEEDS_UPDATE=false |
NEEDS_UPDATE=false |
||||
CURRENT_RELEASE=$(curl -s https://api.github.com/repos/WDaan/VueTorrent/releases/latest | jq -r ".assets[]") |
CURRENT_RELEASE=$(curl -s https://api.github.com/repos/WDaan/VueTorrent/releases/latest | jq -r ".assets[]") |
||||
|
|
||||
# =============================================== |
# =============================================== |
||||
install_deps() { |
install_deps() { |
||||
if ! [[ -x "$(command -v jq)" ]]; then |
if ! [[ -x "$(command -v jq)" ]]; then |
||||
echo '-------------------------' |
echo '-------------------------' |
||||
echo '| Installing jq package |' |
echo '| Installing jq package |' |
||||
echo '-------------------------' |
echo '-------------------------' |
||||
apt-get update && |
apt-get update && |
||||
apt-get install -y jq |
apt-get install -y jq |
||||
fi |
fi |
||||
} |
} |
||||
check_updates() { |
check_updates() { |
||||
if [[ ! -d ./vuetorrent ]]; then |
if [[ ! -d ./vuetorrent ]]; then |
||||
NEEDS_UPDATE=true |
NEEDS_UPDATE=true |
||||
elif [[ ! -f $RELEASE_FILEPATH ]]; then |
elif [[ ! -f $RELEASE_FILEPATH ]]; then |
||||
NEEDS_UPDATE=true |
NEEDS_UPDATE=true |
||||
else |
else |
||||
old_date=$(date -d $(cat "${RELEASE_FILEPATH}" | jq -r ".updated_at") +%s) |
old_date=$(date -d $(cat "${RELEASE_FILEPATH}" | jq -r ".updated_at") +%s) |
||||
new_date=$(date -d $(echo $CURRENT_RELEASE | jq -r ".updated_at") +%s) |
new_date=$(date -d $(echo $CURRENT_RELEASE | jq -r ".updated_at") +%s) |
||||
if [ $new_date -gt $old_date ]; then |
if [ $new_date -gt $old_date ]; then |
||||
NEEDS_UPDATE=true |
NEEDS_UPDATE=true |
||||
fi |
fi |
||||
fi |
fi |
||||
} |
} |
||||
update_ui() { |
update_ui() { |
||||
printf '\nDownloading qBittorrent webui to "/vuetorrent"..please wait\n' |
printf '\nDownloading qBittorrent webui to "/vuetorrent"..please wait\n' |
||||
curl -L $(echo $CURRENT_RELEASE | jq -r ".browser_download_url") --output /tmp/vuetorrent.zip |
curl -L $(echo $CURRENT_RELEASE | jq -r ".browser_download_url") --output /tmp/vuetorrent.zip |
||||
printf '\nDownload finished\n\n' |
printf '\nDownload finished\n\n' |
||||
if [[ -d /vuetorrent ]]; then |
if [[ -d /vuetorrent ]]; then |
||||
rm -rf /vuetorrent |
rm -rf /vuetorrent |
||||
fi |
fi |
||||
# mkdir -p /vuetorrent |
# mkdir -p /vuetorrent |
||||
unzip -q /tmp/vuetorrent.zip -d / |
unzip -q /tmp/vuetorrent.zip -d / |
||||
echo $CURRENT_RELEASE >"${RELEASE_FILEPATH}" |
echo $CURRENT_RELEASE >"${RELEASE_FILEPATH}" |
||||
} |
} |
||||
# =============================================== |
# =============================================== |
||||
|
|
||||
echo '-----------------------------------------' |
echo '-----------------------------------------' |
||||
echo '| qBittorrent vuetorrent theme.park Mod |' |
echo '| qBittorrent vuetorrent theme.park Mod |' |
||||
echo '-----------------------------------------' |
echo '-----------------------------------------' |
||||
|
|
||||
if [[ -z ${TP_HOTIO} ]]; then |
if [[ -z ${TP_HOTIO} ]]; then |
||||
install_deps |
install_deps |
||||
check_updates |
check_updates |
||||
|
|
||||
if [ "$NEEDS_UPDATE" = true ]; then |
if [ "$NEEDS_UPDATE" = true ]; then |
||||
echo '---------------------------------------' |
echo '---------------------------------------' |
||||
echo '| Downloading WebUI files from github |' |
echo '| Downloading WebUI files from github |' |
||||
echo '---------------------------------------' |
echo '---------------------------------------' |
||||
update_ui |
update_ui |
||||
else |
else |
||||
echo ' WebUI files are up-to-date!' |
echo ' WebUI files are up-to-date!' |
||||
fi |
fi |
||||
|
|
||||
if ! grep -q "WebUI\\\RootFolder" "${APP_FILEPATH}"; then |
if ! grep -q "WebUI\\\RootFolder" "${APP_FILEPATH}"; then |
||||
echo '--------------------------------------' |
echo '--------------------------------------' |
||||
echo '| Adding WebUI\RootFolder=/vuetorrent |' |
echo '| Adding WebUI\RootFolder=/vuetorrent |' |
||||
echo '--------------------------------------' |
echo '--------------------------------------' |
||||
sed -i -e '$aWebUI\\RootFolder=/vuetorrent' "${APP_FILEPATH}" |
sed -i -e '$aWebUI\\RootFolder=/vuetorrent' "${APP_FILEPATH}" |
||||
fi |
fi |
||||
|
|
||||
if ! grep -q "WebUI\\\AlternativeUIEnabled" "${APP_FILEPATH}"; then |
if ! grep -q "WebUI\\\AlternativeUIEnabled" "${APP_FILEPATH}"; then |
||||
echo '------------------------------------------' |
echo '------------------------------------------' |
||||
echo '| Adding WebUI\AlternativeUIEnabled=true |' |
echo '| Adding WebUI\AlternativeUIEnabled=true |' |
||||
echo '------------------------------------------' |
echo '------------------------------------------' |
||||
sed -i -e '$aWebUI\\AlternativeUIEnabled=true' "${APP_FILEPATH}" |
sed -i -e '$aWebUI\\AlternativeUIEnabled=true' "${APP_FILEPATH}" |
||||
fi |
fi |
||||
|
|
||||
if ! grep -q "WebUI\\\RootFolder=/vuetorrent" "${APP_FILEPATH}" || ! grep -q "WebUI\\\AlternativeUIEnabled=true" "${APP_FILEPATH}"; then |
if ! grep -q "WebUI\\\RootFolder=/vuetorrent" "${APP_FILEPATH}" || ! grep -q "WebUI\\\AlternativeUIEnabled=true" "${APP_FILEPATH}"; then |
||||
echo '-------------------------------------------------------' |
echo '-------------------------------------------------------' |
||||
echo '| Updating RootFolder and AlternativeUIEnabled values |' |
echo '| Updating RootFolder and AlternativeUIEnabled values |' |
||||
echo '-------------------------------------------------------' |
echo '-------------------------------------------------------' |
||||
sed -i "s/WebUI\\\AlternativeUIEnabled=.*$/WebUI\\\AlternativeUIEnabled=true/g" "${APP_FILEPATH}" |
sed -i "s/WebUI\\\AlternativeUIEnabled=.*$/WebUI\\\AlternativeUIEnabled=true/g" "${APP_FILEPATH}" |
||||
sed -i "s/WebUI\\\RootFolder=.*$/WebUI\\\RootFolder=\/vuetorrent/g" "${APP_FILEPATH}" |
sed -i "s/WebUI\\\RootFolder=.*$/WebUI\\\RootFolder=\/vuetorrent/g" "${APP_FILEPATH}" |
||||
fi |
fi |
||||
fi |
fi |
||||
|
|
||||
# Adding stylesheets |
# Adding stylesheets |
||||
if ! grep -q "${TP_DOMAIN}" "${INDEX_FILEPATH}"; then |
if ! grep -q "${TP_DOMAIN}" "${INDEX_FILEPATH}"; then |
||||
echo '---------------------------------------------------------' |
echo '---------------------------------------------------------' |
||||
echo '| Adding the stylesheet to /vuetorrent/public/index.html |' |
echo '| Adding the stylesheet to /vuetorrent/public/index.html |' |
||||
echo '---------------------------------------------------------' |
echo '---------------------------------------------------------' |
||||
sed -i "s/<\/body>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/themes\/vuetorrent\/vuetorrent-base.css'><\/body> /g" "${INDEX_FILEPATH}" |
sed -i "s/<\/body>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/themes\/vuetorrent\/vuetorrent-base.css'><\/body> /g" "${INDEX_FILEPATH}" |
||||
sed -i "s/<\/body>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/variables\/${TP_THEME}.css'><\/body> /g" "${INDEX_FILEPATH}" |
sed -i "s/<\/body>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/variables\/${TP_THEME}.css'><\/body> /g" "${INDEX_FILEPATH}" |
||||
printf 'Stylesheet set to %s on public index.html\n' "${TP_THEME}" |
printf 'Stylesheet set to %s on public index.html\n' "${TP_THEME}" |
||||
fi |
fi |
Loading…
Reference in new issue