Browse Source

download webui from source

pull/151/head
gilbN 4 years ago
parent
commit
14244b2804
  1. 19
      qbittorrent/root/etc/cont-init.d/98-themepark

19
qbittorrent/root/etc/cont-init.d/98-themepark

@ -20,13 +20,18 @@ if [[ -z ${TP_THEME} ]]; then
TP_THEME='organizr-dark' TP_THEME='organizr-dark'
fi fi
# Copying template # Downloading fresh webui files from source.
if [[ ! -d /themepark ]]; then if [[ ! -d /themepark ]]; then
echo '------------------------' echo '---------------------------------------'
echo '| Copying the template |' echo '| Downloading WebUI files from github |'
echo '------------------------' echo '---------------------------------------'
cp -r /defaults/theme /themepark svn export https://github.com/qbittorrent/qBittorrent/trunk/src/webui/www /themepark
printf 'Template copied to "/themepark"\n' printf 'Downloaded qBittorrent webui to "/themepark"\n'
svn export https://github.com/qbittorrent/qBittorrent/trunk/src/icons /temp
cp -r /temp /themepark/public
cp -r /temp /themepark/private
rm -rf /temp
printf 'Downloaded qBittorrent webui icons to "/themepark"\n'
fi fi
# Adding stylesheets # Adding stylesheets
@ -43,7 +48,7 @@ if ! grep -q "${TP_DOMAIN}" /themepark/private/index.html; then
echo '| Adding the stylesheet to private index.html |' echo '| Adding the stylesheet to private index.html |'
echo '-----------------------------------------------' echo '-----------------------------------------------'
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/theme.park\/CSS\/themes\/qbittorrent\/${TP_THEME}.css'><\/head> /g" /themepark/private/index.html sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/theme.park\/CSS\/themes\/qbittorrent\/${TP_THEME}.css'><\/head> /g" /themepark/private/index.html
printf 'Stylesheet set to %s\n private index.html' "${TP_THEME}" printf 'Stylesheet set to %s on private index.html \n'"${TP_THEME}"
fi fi
if ! grep -q "WebUI\\\RootFolder" /config/qBittorrent/qBittorrent.conf; then if ! grep -q "WebUI\\\RootFolder" /config/qBittorrent/qBittorrent.conf; then

Loading…
Cancel
Save