|
|
|
@ -224,7 +224,7 @@ def getPort(): |
|
|
|
|
conf = getServerDir() + '/redis.conf' |
|
|
|
|
content = mw.readFile(conf) |
|
|
|
|
|
|
|
|
|
rep = r"^(" + r'port' + r'\)\s*([.0-9A-Za-z_& ~]+)' |
|
|
|
|
rep = r"^(port)\s*([.0-9A-Za-z_& ~]+)" |
|
|
|
|
tmp = re.search(rep, content, re.M) |
|
|
|
|
if tmp: |
|
|
|
|
return tmp.groups()[1] |
|
|
|
@ -236,7 +236,7 @@ def getRedisCmd(): |
|
|
|
|
requirepass = "" |
|
|
|
|
conf = getServerDir() + '/redis.conf' |
|
|
|
|
content = mw.readFile(conf) |
|
|
|
|
rep = r"^(requirepass" + r"\)\s*([.0-9A-Za-z_& ~]+)" |
|
|
|
|
rep = r"^(requirepass)\s*([.0-9A-Za-z_& ~]+)" |
|
|
|
|
tmp = re.search(rep, content, re.M) |
|
|
|
|
if tmp: |
|
|
|
|
requirepass = tmp.groups()[1] |
|
|
|
|