mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-18 23:45:52 +08:00
update
This commit is contained in:
@@ -323,7 +323,7 @@ def getPidFile():
|
||||
return tmp.groups()[0].strip()
|
||||
|
||||
|
||||
def binLog():
|
||||
def binLog(version = ''):
|
||||
args = getArgs()
|
||||
conf = getConf()
|
||||
con = mw.readFile(conf)
|
||||
@@ -334,7 +334,7 @@ def binLog():
|
||||
con = con.replace('#log-bin=mysql-bin', 'log-bin=mysql-bin')
|
||||
con = con.replace('#binlog_format=mixed', 'binlog_format=mixed')
|
||||
mw.execShell('sync')
|
||||
restart()
|
||||
restart(version)
|
||||
else:
|
||||
path = getDataDir()
|
||||
if 'status' in args:
|
||||
@@ -348,7 +348,7 @@ def binLog():
|
||||
con = con.replace('log-bin=mysql-bin', '#log-bin=mysql-bin')
|
||||
con = con.replace('binlog_format=mixed', '#binlog_format=mixed')
|
||||
mw.execShell('sync')
|
||||
restart()
|
||||
restart(version)
|
||||
mw.execShell('rm -f ' + path + '/mysql-bin.*')
|
||||
|
||||
mw.writeFile(conf, con)
|
||||
@@ -3804,7 +3804,7 @@ if __name__ == "__main__":
|
||||
elif func == 'conf':
|
||||
print(getConf())
|
||||
elif func == 'bin_log':
|
||||
print(binLog())
|
||||
print(binLog(version))
|
||||
elif func == 'binlog_list':
|
||||
print(binLogList())
|
||||
elif func == 'clean_bin_log':
|
||||
|
||||
Reference in New Issue
Block a user