mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-26 10:38:00 +01: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 "$@"
|