From a433dc6465964c6e41aa53395f4657f56da9b866 Mon Sep 17 00:00:00 2001 From: Esteban Trujillo Date: Wed, 28 Jun 2017 09:55:16 -0400 Subject: [PATCH] Fix the authentication/redis_select_db order when ussing password --- redi.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/redi.sh b/redi.sh index 5798506..eacb6d6 100755 --- a/redi.sh +++ b/redi.sh @@ -169,14 +169,14 @@ fi exec {FD}<> /dev/tcp/"$REDIS_HOST"/"$REDIS_PORT" -redis_select_db "$REDIS_DB" >&$FD -redis_read $FD 1>/dev/null 2>&1 - if [[ ! -z $REDIS_PW ]]; then redis_compose_cmd "$REDIS_PW" >&$FD redis_read $FD 1>/dev/null 2>&1 fi +redis_select_db "$REDIS_DB" >&$FD +redis_read $FD 1>/dev/null 2>&1 + if [[ ! -z $REDIS_GET ]]; then if [[ $REDIS_ARRAY -eq 1 ]]; then redis_get_array "$REDIS_GET" "$REDIS_ARRAY_RANGE" >&$FD