mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-18 23:45:52 +08:00
Update index.py
This commit is contained in:
@@ -197,7 +197,7 @@ def status(version=''):
|
||||
if data[0] == '':
|
||||
return 'stop'
|
||||
|
||||
pid = getServerDir() + '/data/mysql.pid'
|
||||
pid = getPidFile()
|
||||
if not os.path.exists(pid):
|
||||
return 'stop'
|
||||
|
||||
@@ -212,6 +212,14 @@ def getDataDir():
|
||||
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():
|
||||
args = getArgs()
|
||||
conf = getConf()
|
||||
|
||||
Reference in New Issue
Block a user