Skip to content

Commit b197818

Browse files
committed
one more fix for redi in 7.0.1 docker
1 parent d75d2cf commit b197818

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

docker/openemr/7.0.1/openemr.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,15 +197,17 @@ fi
197197
if [ "$REDIS_SERVER" != "" ] &&
198198
[ ! -f /etc/php-redis-configured ]; then
199199

200+
# Support the following redis auth:
201+
# No username and No password set (using redis default user with nopass set)
202+
# Both username and password set (using the redis user and pertinent password)
203+
# Only password set (using redis default user and pertinent password)
204+
# NOTE that only username set is not supported (in this case will ignore the username
205+
# and use no username and no password set mode)
200206
REDIS_PATH="tcp://$REDIS_SERVER:6379"
201207
if [ "$REDIS_USERNAME" != "" ] &&
202208
[ "$REDIS_PASSWORD" != "" ]; then
203209
echo "redis setup with username and password"
204210
REDIS_PATH="$REDIS_PATH?auth[user]=$REDIS_USERNAME\&auth[pass]=$REDIS_PASSWORD"
205-
elif [ "$REDIS_USERNAME" != "" ]; then
206-
# only a username, thus using a user which redis has set to nopass
207-
echo "redis setup with username"
208-
REDIS_PATH="$REDIS_PATH?auth[user]=$REDIS_USERNAME"
209211
elif [ "$REDIS_PASSWORD" != "" ]; then
210212
echo "redis setup with password"
211213
# only a password, thus using the default user which redis has set a password for

0 commit comments

Comments
 (0)