mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-18 23:45:52 +08:00
网站删除优化
This commit is contained in:
+12
-6
@@ -1660,16 +1660,22 @@ location /{
|
||||
def deleteWSLogs(self, webname):
|
||||
assLogPath = public.getLogsDir() + '/' + webname + '.log'
|
||||
errLogPath = public.getLogsDir() + '/' + webname + '.error.log'
|
||||
confFile = self.setupPath + '/web_conf/nginx/conf/vhost/' + webname + '.conf'
|
||||
rewriteFile = self.setupPath + '/web_conf/nginx/conf/rewrite/' + webname + '.conf'
|
||||
logs = [assLogPath, errLogPath, confFile, rewriteFile]
|
||||
confFile = self.setupPath + '/nginx/vhost/' + webname + '.conf'
|
||||
rewriteFile = self.setupPath + '/nginx/rewrite/' + webname + '.conf'
|
||||
rewriteFile = self.setupPath + '/nginx/pass/' + webname + '.conf'
|
||||
keyPath = self.sslDir + webname + '/privkey.pem'
|
||||
certPath = self.sslDir + webname + '/fullchain.pem'
|
||||
logs = [assLogPath,
|
||||
errLogPath,
|
||||
confFile,
|
||||
rewriteFile,
|
||||
keyPath,
|
||||
certPath]
|
||||
for i in logs:
|
||||
public.deleteFile(i)
|
||||
|
||||
def delete(self, sid, webname, path):
|
||||
|
||||
self.deleteWSLogs(webname)
|
||||
|
||||
if path == '1':
|
||||
rootPath = public.getWwwDir() + '/' + webname
|
||||
public.execShell('rm -rf ' + rootPath)
|
||||
@@ -1727,7 +1733,7 @@ location /{
|
||||
self.saveCert(keyPath, certPath)
|
||||
|
||||
msg = public.getInfo('网站[{1}]开启SSL成功!', siteName)
|
||||
public.writeLog('TYPE_SITE', msg)
|
||||
public.writeLog('网站管理', msg)
|
||||
return public.returnData(True, 'SSL开启成功!')
|
||||
|
||||
def saveCert(self, keyPath, certPath):
|
||||
|
||||
Reference in New Issue
Block a user