From a7a2fb69479668fadbc612d0946e5e836c784226 Mon Sep 17 00:00:00 2001 From: xiepaup Date: Tue, 29 Oct 2024 14:42:55 +0800 Subject: [PATCH] =?UTF-8?q?fix(redis):=20=E4=BF=AE=E5=A4=8D=E5=86=99export?= =?UTF-8?q?er=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=20bug=20=20#7634?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../redis/db-tools/dbactuator/models/myredis/myredis.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbm-services/redis/db-tools/dbactuator/models/myredis/myredis.go b/dbm-services/redis/db-tools/dbactuator/models/myredis/myredis.go index f18819a8c2..14e2eaeb5c 100644 --- a/dbm-services/redis/db-tools/dbactuator/models/myredis/myredis.go +++ b/dbm-services/redis/db-tools/dbactuator/models/myredis/myredis.go @@ -97,7 +97,7 @@ func GetProxyPasswdFromConfFlie(port int, role string) (password string, err err if err != nil { return } - grepCmd = fmt.Sprintf(`grep -w "password" %s|grep -vE "#"|awk '{print $NF}'`, confFile) + grepCmd = fmt.Sprintf(`grep -w "password" %s|grep -vE "#\s*password" |awk '{print $NF}'`, confFile) } else if role == consts.MetaRolePredixy { confFile, err = GetPredixyLocalConfFile(port) if err != nil {