mirror of
https://github.com/clearlinux/dockerfiles.git
synced 2026-07-19 10:55:52 +00:00
52fb1c147e
Signed-off-by: William Douglas <william.douglas@intel.com>
16 lines
327 B
Bash
16 lines
327 B
Bash
#!/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 -- valkey-server "$@"
|
|
fi
|
|
|
|
# change to redis user to run
|
|
if [ "$1" = 'valkey-server' -a "$(id -u)" = '0' ]; then
|
|
exec su-exec redis "$BASH_SOURCE" "$@"
|
|
fi
|
|
|
|
exec "$@"
|