update entrypoint.sh to conditionally execute Python script or pass commands as appuser
This commit is contained in:
+8
-2
@@ -5,5 +5,11 @@ set -e
|
||||
chown -R ${PUID:-1000}:${PGID:-1000} /app/data /tmp/sc-config 2>/dev/null || true
|
||||
chmod 700 /tmp/sc-config 2>/dev/null || true
|
||||
|
||||
# Auf User wechseln und Python-Skript starten
|
||||
exec gosu appuser python /app/scalable_sync.py "$@"
|
||||
# Wenn der erste Parameter "python" ist oder das Skript selbst → Python starten
|
||||
if [ "$1" = "python" ] || [ "$1" = "/app/scalable_sync.py" ]; then
|
||||
shift
|
||||
exec gosu appuser python /app/scalable_sync.py "$@"
|
||||
fi
|
||||
|
||||
# Sonst: Befehl direkt als appuser ausführen (z. B. sc login)
|
||||
exec gosu appuser "$@"
|
||||
Reference in New Issue
Block a user