This commit is contained in:
Mr Chen
2019-01-02 16:13:21 +08:00
parent f3c75fd00c
commit 73ac11e244
2 changed files with 13 additions and 5 deletions
+5
View File
@@ -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
+8 -5
View File
@@ -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():