This commit is contained in:
Mr Chen
2019-01-11 13:53:25 +08:00
parent f470ae037f
commit ed992ff1a3
3 changed files with 67 additions and 1 deletions
+7 -1
View File
@@ -72,7 +72,7 @@ def getSqlFile():
def getDbConf():
file = getServerDir() + "/workers/db.cfg"
file = getServerDir() + "/db.cfg"
return file
@@ -88,6 +88,12 @@ def initDreplace():
sdir = getPluginDir() + '/workers'
public.execShell('cp -rf ' + sdir + ' ' + getServerDir())
cfg = getServerDir() + '/db.cfg'
if not os.path.exists(cfg):
cfg_tpl = getPluginDir() + '/workers/db.cfg'
content = public.readFile(cfg_tpl)
public.writeFile(cfg, content)
file_tpl = getInitDTpl()
service_path = os.path.dirname(os.getcwd())