Update index.py

This commit is contained in:
Mr Chen
2023-12-22 21:54:05 +08:00
parent 4802dde50a
commit f0af84f940
+10 -1
View File
@@ -114,7 +114,16 @@ def getErrorLogsFile():
tmp = re.search(rep, content) tmp = re.search(rep, content)
return tmp.groups()[0].strip() return tmp.groups()[0].strip()
def getAuthPolicy():
file = getConf()
content = mw.readFile(file)
rep = 'authentication_policy\s*=\s*(.*)'
tmp = re.search(rep, content)
if tmp:
return tmp.groups()[0].strip()
# caching_sha2_password
return 'mysql_native_password'
def contentReplace(content): def contentReplace(content):
service_path = mw.getServerDir() service_path = mw.getServerDir()
content = content.replace('{$ROOT_PATH}', mw.getRootDir()) content = content.replace('{$ROOT_PATH}', mw.getRootDir())