#!/bin/sh # deploy/docker-entrypoint.sh: the Docker image's ENTRYPOINT. It runs as # root only to give /var/lib/pixa to pixad: a host directory # bind-mounted there keeps its host owner, often root, and pixad could # not write to it. The server itself always runs as pixad. set -eu main() { if [ "$(stat -c %U /var/lib/pixa)" != pixad ]; then chown pixad:pixad /var/lib/pixa fi exec su-exec pixad /usr/local/bin/pixad "$@" } main "$@"