20 lines
598 B
Bash
20 lines
598 B
Bash
#!/bin/sh
|
|
set -eu
|
|
|
|
PUID="${PUID:-99}"
|
|
PGID="${PGID:-100}"
|
|
|
|
case "$PUID:$PGID" in
|
|
*[!0-9:]*|:|*:) echo "PUID en PGID moeten numeriek zijn" >&2; exit 64 ;;
|
|
esac
|
|
|
|
groupmod --gid "$PGID" lumaops 2>/dev/null || true
|
|
usermod --uid "$PUID" --gid "$PGID" lumaops 2>/dev/null || true
|
|
|
|
mkdir -p /config/openrgb /config/lumaops /data /logs /run/lumaops
|
|
chown -R "$PUID:$PGID" /config/lumaops /data /logs /run/lumaops
|
|
chown -R "$PUID:$PGID" /config/openrgb
|
|
gosu "$PUID:$PGID" mkdir -p /data/backups
|
|
|
|
exec gosu "$PUID:$PGID" /usr/bin/tini -- /opt/venv/bin/python /opt/lumaops/supervisor.py
|