mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-18 23:45:52 +08:00
updata
This commit is contained in:
@@ -7,9 +7,14 @@ import public
|
||||
import re
|
||||
import json
|
||||
|
||||
import sys
|
||||
reload(sys)
|
||||
sys.setdefaultencoding('utf8')
|
||||
|
||||
import threading
|
||||
import multiprocessing
|
||||
|
||||
|
||||
from flask import request
|
||||
|
||||
|
||||
|
||||
@@ -186,13 +186,16 @@ def status():
|
||||
|
||||
|
||||
def start():
|
||||
path = os.path.dirname(os.getcwd())
|
||||
cmd = path + "/redis/bin/redis-server"
|
||||
cmd = cmd + " " + path + "/redis/redis.conf"
|
||||
initMysql = getServerDir() + '/scripts/mysql_install_db ' + '--basedir=' + \
|
||||
getServerDir() + ' --datadir=' + getServerDir() + '/bin/mysql/data'
|
||||
return initMysql
|
||||
|
||||
cmd = getServerDir() + '/bin/mysqld_safe ' + getServerDir() + \
|
||||
'/conf/my.cnf ' + '--user=mysql&'
|
||||
data = public.execShell(cmd)
|
||||
if data[0] == '':
|
||||
return 'ok'
|
||||
return 'fail'
|
||||
return 'stop'
|
||||
return data[0]
|
||||
|
||||
|
||||
def stop():
|
||||
|
||||
Reference in New Issue
Block a user