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