Files
nicotine-less/entrypoint.sh
Claude b0c6d76797 Initial commit: Nicotine-Less Docker container
Lightweight Docker container for Nicotine+ with noVNC web interface and Firefox ESR browser.

Features:
- noVNC web interface with dynamic resize support
- Firefox ESR for testing ports and browsing
- TigerVNC with AcceptSetDesktopSize enabled
- Supervisor for process management
- Configurable user/group permissions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-19 20:16:36 +02:00

44 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
set -e
# Aggiorna PUID e PGID se necessario
if [ ! -z "$PUID" ] && [ "$PUID" != "1000" ]; then
usermod -u $PUID nicotine
fi
if [ ! -z "$PGID" ] && [ "$PGID" != "1000" ]; then
groupmod -g $PGID nicotine
fi
# Correggi permessi sui volumi
chown -R nicotine:nicotine /config /downloads /incomplete 2>/dev/null || true
# Crea directory necessarie
mkdir -p /home/nicotine/.local/share/nicotine
chown -R nicotine:nicotine /home/nicotine/.local
# Crea link simbolico dalla config di Nicotine+ al volume persistente
if [ ! -L "/home/nicotine/.config/nicotine" ]; then
rm -rf /home/nicotine/.config/nicotine
ln -s /config /home/nicotine/.config/nicotine
fi
# Configura password VNC se specificata
if [ ! -z "$VNC_PASSWORD" ]; then
mkdir -p /home/nicotine/.vnc
echo "$VNC_PASSWORD" | vncpasswd -f > /home/nicotine/.vnc/passwd
chmod 600 /home/nicotine/.vnc/passwd
chown nicotine:nicotine /home/nicotine/.vnc/passwd
fi
# Esporta variabili d'ambiente per supervisord
export DISPLAY
export VNC_PORT
export NOVNC_PORT
export VNC_RESOLUTION
export VNC_DEPTH
export USER
# Avvia supervisord come root (che poi farà partire i processi come utente nicotine)
exec "$@"