|
|
@ -168,7 +168,7 @@ def initDreplace(version=''): |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def status(version=''): |
|
|
|
def status(version=''): |
|
|
|
pid = getServerDir() + '/data/mysql.pid' |
|
|
|
pid = getPidFile() |
|
|
|
if not os.path.exists(pid): |
|
|
|
if not os.path.exists(pid): |
|
|
|
return 'stop' |
|
|
|
return 'stop' |
|
|
|
return 'start' |
|
|
|
return 'start' |
|
|
@ -182,6 +182,14 @@ def getDataDir(): |
|
|
|
return tmp.groups()[0].strip() |
|
|
|
return tmp.groups()[0].strip() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def getPidFile(): |
|
|
|
|
|
|
|
file = getConf() |
|
|
|
|
|
|
|
content = mw.readFile(file) |
|
|
|
|
|
|
|
rep = 'pid-file\s*=\s*(.*)' |
|
|
|
|
|
|
|
tmp = re.search(rep, content) |
|
|
|
|
|
|
|
return tmp.groups()[0].strip() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def binLog(): |
|
|
|
def binLog(): |
|
|
|
args = getArgs() |
|
|
|
args = getArgs() |
|
|
|
conf = getConf() |
|
|
|
conf = getConf() |
|
|
|