File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 197
197
if [ " $REDIS_SERVER " != " " ] &&
198
198
[ ! -f /etc/php-redis-configured ]; then
199
199
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)
200
206
REDIS_PATH=" tcp://$REDIS_SERVER :6379"
201
207
if [ " $REDIS_USERNAME " != " " ] &&
202
208
[ " $REDIS_PASSWORD " != " " ]; then
203
209
echo " redis setup with username and password"
204
210
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 "
209
211
elif [ " $REDIS_PASSWORD " != " " ]; then
210
212
echo " redis setup with password"
211
213
# only a password, thus using the default user which redis has set a password for
You can’t perform that action at this time.
0 commit comments