From f13141ad2f9f0f516e239a4f4e0e81f21a9b58aa Mon Sep 17 00:00:00 2001 From: xiepaup Date: Wed, 10 Apr 2024 11:07:50 +0800 Subject: [PATCH] =?UTF-8?q?fix(redis):=20=E4=BF=AE=E5=A4=8D=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E5=AF=86=E7=A0=81=E6=97=B6=EF=BC=8C=E5=AF=86=E7=A0=81?= =?UTF-8?q?=E5=B8=A6=20#3919?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dbm-services/redis/db-tools/dbmon/models/myredis/myredis.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbm-services/redis/db-tools/dbmon/models/myredis/myredis.go b/dbm-services/redis/db-tools/dbmon/models/myredis/myredis.go index 19eed8473f..7f65943e46 100644 --- a/dbm-services/redis/db-tools/dbmon/models/myredis/myredis.go +++ b/dbm-services/redis/db-tools/dbmon/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 "^#"|awk '{print $NF}'`, confFile) } else if role == consts.MetaRolePredixy { confFile, err = GetPredixyLocalConfFile(port) if err != nil {