Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for custom web ui themes #409

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ ADD build/*.conf /etc/supervisor/conf.d/
# add bash scripts to install app
ADD build/root/*.sh /root/

# add bash script to keep custom theme files updated
ADD run/root/*.sh /home/root/

# add bash script to run deluge
ADD run/nobody/*.sh /home/nobody/

Expand Down
8 changes: 7 additions & 1 deletion build/delugevpn.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@ user = root
command = /root/start.sh
umask = 000

[program:themes-script]
autorestart = false
startsecs = 0
user = root
command = /home/root/updatethemes.sh
umask = 000

[program:watchdog-script]
autorestart = false
startsecs = 0
user = nobody
command = /home/nobody/watchdog.sh
umask = 000


22 changes: 22 additions & 0 deletions run/root/updatethemes.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/dumb-init /bin/bash

# create folders if they don't exist
if [[ ! -d /skins ]]; then
echo "[info] /skins folder doesn't exist, creating..."
mkdir /skins
mkdir /skins/themes
mkdir /skins/icons
mkdir /skins/images
fi

# cleanup broken symlinks
echo "[info] Cleaning up old custom deluge web ui skin symlinks"
find /usr/lib/python3.12/site-packages/deluge/ui/web/themes/ -type l -exec unlink {} \;
find /usr/lib/python3.12/site-packages/deluge/ui/web/icons/ -type l -exec unlink {} \;
find /usr/lib/python3.12/site-packages/deluge/ui/web/images/ -type l -exec unlink {} \;

# map current skin files to repective deluge web ui folders
echo "[info] Creating new custom deluge web ui skin symlinks"
cp -rs /skins/themes /usr/lib/python3.12/site-packages/deluge/ui/web/
cp -rs /skins/icons /usr/lib/python3.12/site-packages/deluge/ui/web/
cp -rs /skins/images /usr/lib/python3.12/site-packages/deluge/ui/web/