harbor/make/photon/redis/docker-entrypoint.sh
yixingj ee6a6af3c5 Add Redis docker file
Add the redis docker files
2018-03-23 17:46:43 +08:00

14 lines
225 B
Bash

#!/bin/sh
set -e
if [ "${1#-}" != "$1" ] || [ "${1%.conf}" != "$1" ]; then
set -- redis-server "$@"
fi
if [ "$1" = 'redis-server' -a "$(id -u)" = '0' ]; then
chown -R redis .
exec sudo -u redis "$@"
fi
exec "$@"