Files
scalable-wealth/entrypoint.sh
T

23 lines
665 B
Bash

#!/bin/sh
set -e
chown -R ${PUID:-1000}:${PGID:-1000} /app/data 2>/dev/null || true
# Wenn der erste Parameter "python" ist → shift und ggf. Skript-Pfad auch entfernen
if [ "$1" = "python" ]; then
shift
# Wenn das nächste Argument das Skript selbst ist → auch entfernen
if [ "$1" = "/app/scalable_sync.py" ]; then
shift
fi
exec gosu appuser python /app/scalable_sync.py "$@"
fi
# Wenn das Skript direkt als erster Parameter kommt
if [ "$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 "$@"