mirror of
https://github.com/librenms/docker.git
synced 2026-01-23 02:14:48 +00:00
Prioritize REDIS_SENTINEL over REDIS_HOST
This commit is contained in:
parent
4c3b0172b0
commit
bf1674d489
1 changed files with 9 additions and 9 deletions
|
|
@ -94,15 +94,6 @@ fi
|
|||
if [ -z "$REDIS_HOST" ] && [ -z "$REDIS_SENTINEL" ]; then
|
||||
echo >&2 "ERROR: REDIS_HOST or REDIS_SENTINEL must be defined"
|
||||
exit 1
|
||||
elif [ -n "$REDIS_HOST" ]; then
|
||||
echo "Setting Redis"
|
||||
cat >>${LIBRENMS_PATH}/.env <<EOL
|
||||
REDIS_HOST=${REDIS_HOST}
|
||||
REDIS_SCHEME=${REDIS_SCHEME}
|
||||
REDIS_PORT=${REDIS_PORT}
|
||||
REDIS_PASSWORD=${REDIS_PASSWORD}
|
||||
REDIS_DB=${REDIS_DB}
|
||||
EOL
|
||||
elif [ -n "$REDIS_SENTINEL" ]; then
|
||||
echo "Setting Redis Sentinel"
|
||||
cat >>${LIBRENMS_PATH}/.env <<EOL
|
||||
|
|
@ -113,6 +104,15 @@ REDIS_PORT=${REDIS_PORT}
|
|||
REDIS_PASSWORD=${REDIS_PASSWORD}
|
||||
REDIS_DB=${REDIS_DB}
|
||||
EOL
|
||||
elif [ -n "$REDIS_HOST" ]; then
|
||||
echo "Setting Redis"
|
||||
cat >>${LIBRENMS_PATH}/.env <<EOL
|
||||
REDIS_HOST=${REDIS_HOST}
|
||||
REDIS_SCHEME=${REDIS_SCHEME}
|
||||
REDIS_PORT=${REDIS_PORT}
|
||||
REDIS_PASSWORD=${REDIS_PASSWORD}
|
||||
REDIS_DB=${REDIS_DB}
|
||||
EOL
|
||||
fi
|
||||
|
||||
# Create service
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue