如果目录存在,就不初始化

pull/199/head
midoks 3 years ago
parent eedaef7eec
commit 416e9e7cda
  1. 8
      class/core/site_api.py

@ -2103,12 +2103,16 @@ location ^~ {from} {
return rewriteList
def createRootDir(self, path):
autoInit = False
if not os.path.exists(path):
autoInit = True
os.makedirs(path)
if not mw.isAppleSystem():
mw.execShell('chown -R www:www ' + path)
mw.writeFile(path + '/index.html', 'Work has started!!!')
mw.execShell('chmod -R 755 ' + path)
if autoInit:
mw.writeFile(path + '/index.html', 'Work has started!!!')
mw.execShell('chmod -R 755 ' + path)
def nginxAddDomain(self, webname, domain, port):
file = self.getHostConf(webname)

Loading…
Cancel
Save