mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2024-12-14 11:58:02 +00:00
15 lines
296 B
Bash
Executable file
15 lines
296 B
Bash
Executable file
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
# first arg is `--some-option`
|
|
if [ "${1#-}" != "$1" ]; then
|
|
set -- dragonfly "$@"
|
|
fi
|
|
|
|
# allow the docker container to be started with `--user`
|
|
if [ "$1" = 'dragonfly' -a "$(id -u)" = '0' ]; then
|
|
exec su-exec dfly "$0" "$@" # runs this script under user dfly
|
|
fi
|
|
|
|
exec "$@"
|