From aac4a4bbaf475970419b28366e57c792e00d6e59 Mon Sep 17 00:00:00 2001 From: Lukas Pierchalla Date: Sun, 20 Sep 2026 11:03:10 +0200 Subject: [PATCH] update entrypoint.sh to conditionally execute Python script or pass commands as appuser --- entrypoint.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 3b80793..18e28a9 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -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 "$@" \ No newline at end of file +# 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 "$@" \ No newline at end of file