|
|
@ -1,8 +1,10 @@ |
|
|
|
#!/usr/bin/with-contenv bash |
|
|
|
APP_FILEPATH='/config/qBittorrent/qBittorrent.conf' |
|
|
|
INDEX_FILEPATH='/vuetorrent/public/index.html' |
|
|
|
if [ "${TP_HOTIO}" = true ]; then |
|
|
|
echo 'Changing to Hotio file path!' |
|
|
|
echo 'Changing to Hotio file paths!' |
|
|
|
APP_FILEPATH='/config/config/qBittorrent.conf' |
|
|
|
INDEX_FILEPATH='/app/vuetorrent/public/index.html' |
|
|
|
fi |
|
|
|
# Display variables for troubleshooting |
|
|
|
echo -e "Variables set:\\n\ |
|
|
@ -70,6 +72,7 @@ echo '-----------------------------------------' |
|
|
|
echo '| qBittorrent vuetorrent theme.park Mod |' |
|
|
|
echo '-----------------------------------------' |
|
|
|
|
|
|
|
if [[ -z ${TP_HOTIO} ]]; then |
|
|
|
install_deps |
|
|
|
check_updates |
|
|
|
|
|
|
@ -82,15 +85,6 @@ else |
|
|
|
echo ' WebUI files are up-to-date!' |
|
|
|
fi |
|
|
|
|
|
|
|
# Adding stylesheets |
|
|
|
if ! grep -q "${TP_DOMAIN}" /vuetorrent/public/index.html; then |
|
|
|
echo '---------------------------------------------------------' |
|
|
|
echo '| Adding the stylesheet to /vuetorrent/public/index.html |' |
|
|
|
echo '---------------------------------------------------------' |
|
|
|
sed -i "s/<\/body>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/themes\/vuetorrent\/${TP_THEME}.css'><\/body> /g" /vuetorrent/public/index.html |
|
|
|
printf 'Stylesheet set to %s on public index.html\n' "${TP_THEME}" |
|
|
|
fi |
|
|
|
|
|
|
|
if ! grep -q "WebUI\\\RootFolder" "${APP_FILEPATH}"; then |
|
|
|
echo '--------------------------------------' |
|
|
|
echo '| Adding WebUI\RootFolder=/vuetorrent |' |
|
|
@ -112,3 +106,13 @@ if ! grep -q "WebUI\\\RootFolder=/vuetorrent" "${APP_FILEPATH}" || ! grep -q "We |
|
|
|
sed -i "s/WebUI\\\AlternativeUIEnabled=.*$/WebUI\\\AlternativeUIEnabled=true/g" "${APP_FILEPATH}" |
|
|
|
sed -i "s/WebUI\\\RootFolder=.*$/WebUI\\\RootFolder=\/vuetorrent/g" "${APP_FILEPATH}" |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
# Adding stylesheets |
|
|
|
if ! grep -q "${TP_DOMAIN}" "${INDEX_FILEPATH}"; then |
|
|
|
echo '---------------------------------------------------------' |
|
|
|
echo '| Adding the stylesheet to /vuetorrent/public/index.html |' |
|
|
|
echo '---------------------------------------------------------' |
|
|
|
sed -i "s/<\/body>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/themes\/vuetorrent\/${TP_THEME}.css'><\/body> /g" "${INDEX_FILEPATH}" |
|
|
|
printf 'Stylesheet set to %s on public index.html\n' "${TP_THEME}" |
|
|
|
fi |