mirror of
https://github.com/goharbor/harbor.git
synced 2024-09-11 05:28:12 +02:00
14 lines
225 B
Bash
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 "$@"
|