Update cert_api.py

pull/539/head
Mr Chen 1 year ago
parent 519544715f
commit e22722f40e
  1. 11
      class/core/cert_api.py

@ -1293,18 +1293,18 @@ fullchain.pem 粘贴到证书输入框
import panelSite import panelSite
args = mw.dict_obj() args = mw.dict_obj()
args.siteName = '' args.siteName = ''
for c_name in os.listdir(cert_paths): for cert_name in os.listdir(cert_paths):
skey_file = '{}/{}/privkey.pem'.format(cert_paths, c_name) skey_file = '{}/{}/privkey.pem'.format(cert_paths, cert_name)
skey = mw.readFile(skey_file) skey = mw.readFile(skey_file)
if not skey: if not skey:
continue continue
if skey == pkey: if skey == pkey:
args.siteName = c_name args.siteName = cert_name
run_path = panelSite.panelSite().GetRunPath(args) run_path = panelSite.panelSite().GetRunPath(args)
if not run_path: if not run_path:
continue continue
sitePath = mw.M('sites').where( sitePath = mw.M('sites').where(
'name=?', c_name).getField('path') 'name=?', cert_name).getField('path')
if not sitePath: if not sitePath:
continue continue
to_path = "{}/{}".format(sitePath, run_path) to_path = "{}/{}".format(sitePath, run_path)
@ -1509,8 +1509,7 @@ fullchain.pem 粘贴到证书输入框
# 已删除的网站直接跳过续签 # 已删除的网站直接跳过续签
if self.__config['orders'][i]['auth_to'].find('|') == -1 and self.__config['orders'][i]['auth_to'].find('/') != -1: if self.__config['orders'][i]['auth_to'].find('|') == -1 and self.__config['orders'][i]['auth_to'].find('/') != -1:
if not os.path.exists(self.__config['orders'][i]['auth_to']): if not os.path.exists(self.__config['orders'][i]['auth_to']):
auth_to = self.getSslUsedSite( auth_to = self.getSslUsedSite(self.__config['orders'][i]['save_path'])
self.__config['orders'][i]['save_path'])
if not auth_to: if not auth_to:
continue continue

Loading…
Cancel
Save