1
0
mirror of https://github.com/gilbN/theme.park.git synced 2024-10-05 15:07:11 +02:00

Deluge docker mod: path fix for #332

This commit is contained in:
GilbN 2022-03-19 10:31:38 +01:00
parent 453f4cf360
commit 296f7aa696

View File

@ -34,13 +34,13 @@ if [[ -z ${TP_THEME} ]]; then
fi
# Adding stylesheets
INDEX_HTML='/usr/lib/python3/dist-packages/deluge/ui/web/index.html'
if ! grep -q "${TP_DOMAIN}/css/base" "$INDEX_HTML"; then
DELUGE_INDEX_PATH=$(find -name index.html)
if ! grep -q "${TP_DOMAIN}/css/base" ${DELUGE_INDEX_PATH}; then
echo '---------------------------'
echo '| Adding the stylesheet |'
echo '---------------------------'
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/css\/base\/deluge\/deluge-base.css'><\/head> /g" "$INDEX_HTML"
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/css\/${THEME_TYPE}\/${TP_THEME}.css'><\/head> /g" "$INDEX_HTML"
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/css\/base\/deluge\/deluge-base.css'><\/head> /g" ${DELUGE_INDEX_PATH}
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/css\/${THEME_TYPE}\/${TP_THEME}.css'><\/head> /g" ${DELUGE_INDEX_PATH}
printf 'Stylesheet set to %s\n' "${TP_THEME}
"
fi