mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-18 23:45:52 +08:00
update
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
<div class="bt-w-main">
|
||||
<div class="bt-w-menu">
|
||||
<p class="bgw" onclick="pluginService('simdht');">服务</p>
|
||||
<p onclick="pluginInitD('simdht');">自启动</p>
|
||||
<p onclick="pluginConfig('simdht', '','get_sql');">手动导入SQL</p>
|
||||
<p onclick="pluginConfig('simdht', '','get_db_conf');">配置</p>
|
||||
<p onclick="pluginLogs('simdht','','get_run_Log', 10);">日志</p>
|
||||
|
||||
@@ -147,6 +147,39 @@ def reload():
|
||||
return 'fail'
|
||||
|
||||
|
||||
def initdStatus():
|
||||
if not app_debug:
|
||||
if public.isAppleSystem():
|
||||
return "Apple Computer does not support"
|
||||
|
||||
initd_bin = getInitDFile()
|
||||
if os.path.exists(initd_bin):
|
||||
return 'ok'
|
||||
return 'fail'
|
||||
|
||||
|
||||
def initdInstall():
|
||||
import shutil
|
||||
if not app_debug:
|
||||
if public.isAppleSystem():
|
||||
return "Apple Computer does not support"
|
||||
|
||||
mysql_bin = initDreplace()
|
||||
initd_bin = getInitDFile()
|
||||
shutil.copyfile(mysql_bin, initd_bin)
|
||||
public.execShell('chmod +x ' + initd_bin)
|
||||
return 'ok'
|
||||
|
||||
|
||||
def initdUinstall():
|
||||
if not app_debug:
|
||||
if public.isAppleSystem():
|
||||
return "Apple Computer does not support"
|
||||
initd_bin = getInitDFile()
|
||||
os.remove(initd_bin)
|
||||
return 'ok'
|
||||
|
||||
|
||||
def matchData(reg, content):
|
||||
tmp = re.search(reg, content).groups()
|
||||
return tmp[0]
|
||||
@@ -237,6 +270,12 @@ if __name__ == "__main__":
|
||||
print restart()
|
||||
elif func == 'reload':
|
||||
print reload()
|
||||
elif func == 'initd_status':
|
||||
print initdStatus()
|
||||
elif func == 'initd_install':
|
||||
print initdInstall()
|
||||
elif func == 'initd_uninstall':
|
||||
print initdUinstall()
|
||||
elif func == 'get_sql':
|
||||
print getSqlFile()
|
||||
elif func == 'get_db_conf':
|
||||
|
||||
Reference in New Issue
Block a user