|
|
@ -102,6 +102,14 @@ def getSocketFile(): |
|
|
|
return tmp.groups()[0].strip() |
|
|
|
return tmp.groups()[0].strip() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def getErrorLogsFile(): |
|
|
|
|
|
|
|
file = getConf() |
|
|
|
|
|
|
|
content = mw.readFile(file) |
|
|
|
|
|
|
|
rep = 'log-error\s*=\s*(.*)' |
|
|
|
|
|
|
|
tmp = re.search(rep, content) |
|
|
|
|
|
|
|
return tmp.groups()[0].strip() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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()) |
|
|
@ -235,15 +243,7 @@ def setSkipGrantTables(v): |
|
|
|
|
|
|
|
|
|
|
|
def getErrorLog(): |
|
|
|
def getErrorLog(): |
|
|
|
args = getArgs() |
|
|
|
args = getArgs() |
|
|
|
path = getDataDir() |
|
|
|
filename = getErrorLogsFile() |
|
|
|
filename = '' |
|
|
|
|
|
|
|
for n in os.listdir(path): |
|
|
|
|
|
|
|
if len(n) < 5: |
|
|
|
|
|
|
|
continue |
|
|
|
|
|
|
|
if n == 'error.log': |
|
|
|
|
|
|
|
filename = path + '/' + n |
|
|
|
|
|
|
|
break |
|
|
|
|
|
|
|
# print filename |
|
|
|
|
|
|
|
if not os.path.exists(filename): |
|
|
|
if not os.path.exists(filename): |
|
|
|
return mw.returnJson(False, '指定文件不存在!') |
|
|
|
return mw.returnJson(False, '指定文件不存在!') |
|
|
|
if 'close' in args: |
|
|
|
if 'close' in args: |
|
|
|