Update index.py

This commit is contained in:
midoks 2022-08-08 15:02:35 +08:00
parent 5b441d5cb4
commit 03b495ad89
1 changed files with 9 additions and 2 deletions

View File

@ -164,14 +164,18 @@ def pgDb():
def initDreplace(version=''):
conf_dir = getServerDir()
log_dir = conf_dir + "/logs"
conf_list = [
log_dir
conf_dir + "/logs",
conf_dir + "/tmp",
]
for c in conf_list:
if not os.path.exists(c):
os.mkdir(c)
logfile = runLog()
if not os.path.exists(logfile):
mw.writeFile(logfile, '')
init_pl = conf_dir + "/init.pl"
if not os.path.exists(init_pl):
# mw.writeFile(init_pl, 'ok')
@ -353,6 +357,9 @@ def restart(version=''):
def reload(version=''):
logfile = runLog()
if not os.path.exists(logfile):
mw.writeFile(logfile, '')
return appCMD(version, 'reload')