Update site_api.py

pull/143/head
midoks 3 years ago
parent 6d8ecc2e7b
commit 5b5bceaa54
  1. 10
      class/core/site_api.py

@ -390,6 +390,14 @@ class site_api:
mpath = vpath + '/' + d + '/info.json'
if not os.path.exists(mpath):
continue
# keyPath = self.sslDir + siteName + '/privkey.pem'
# certPath = self.sslDir + siteName + '/fullchain.pem'
keyPath = vpath + '/' + d + '/privkey.pem'
certPath = vpath + '/' + d + '/fullchain.pem'
self.saveCert(keyPath, certPath)
tmp = mw.readFile(mpath)
if not tmp:
continue
@ -479,8 +487,8 @@ class site_api:
mw.execShell('\\cp -a /tmp/backup2.conf ' + csrpath)
return mw.returnJson(False, 'ERROR: <br><a style="color:red;">' + isError.replace("\n", '<br>') + '</a>')
mw.restartWeb()
mw.writeLog('网站管理', '证书已保存!')
mw.restartWeb()
return mw.returnJson(True, '证书已保存!')
def setCertToSiteApi(self):

Loading…
Cancel
Save