29 lines
872 B
Bash
29 lines
872 B
Bash
#!/bin/sh
|
|
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
|
|
|
|
mkdir -p "${SC_CONFIG_DIR:-/tmp/sc-config}"
|
|
cat > "${SC_CONFIG_DIR:-/tmp/sc-config}/config.toml" <<'EOF'
|
|
[auth]
|
|
session_backend = "file"
|
|
signing_key_backend = "file"
|
|
EOF
|
|
|
|
# DBus starten
|
|
dbus-daemon --session --fork --address="unix:path=/tmp/dbus-session" 2>/dev/null || true
|
|
export DBUS_SESSION_BUS_ADDRESS=unix:path=/tmp/dbus-session
|
|
|
|
# gnome-keyring als Secret Service starten (als appuser)
|
|
gosu appuser sh -c '
|
|
echo -n "" | gnome-keyring-daemon --unlock --components=secrets 2>/dev/null
|
|
gnome-keyring-daemon --start --components=secrets 2>/dev/null || true
|
|
'
|
|
|
|
if [ "$1" = "python" ] || [ "$1" = "/app/scalable_sync.py" ]; then
|
|
shift
|
|
exec gosu appuser python /app/scalable_sync.py "$@"
|
|
fi
|
|
|
|
exec gosu appuser "$@" |