futriix/pkg/docker/app/docker-entrypoint.sh
John Sully 638926621a Merge PKG files from unstable
No code change


Former-commit-id: 42c4d85d72af99322b21faab74ae23556b2054f0
2020-06-24 00:16:21 -04:00

17 lines
374 B
Bash
Executable File

#!/bin/sh
set -e
# first arg is `-f` or `--some-option`
# or first arg is `something.conf`
if [ "${1#-}" != "$1" ] || [ "${1%.conf}" != "$1" ]; then
set -- keydb-server "$@"
fi
# allow the container to be started with `--user`
if [ "$1" = 'keydb-server' -a "$(id -u)" = '0' ]; then
find . \! -user keydb -exec chown keydb '{}' +
exec gosu keydb "$0" "$@"
fi
exec "$@"