update 6.2.4

This commit is contained in:
jose
2019-09-07 16:25:23 +08:00
parent c86a5c2466
commit 5663522d80
199 changed files with 14589 additions and 719 deletions
+23 -1
View File
@@ -13,7 +13,7 @@
#------------------------------
import sys,os,json,psutil
sys.path.insert(0,"/www/server/panel/class/")
import db,public,time,panelTask
import db,public,time,panelTask,setPanelLets
global pre,timeoutCount,logPath,isTask,oldEdate,isCheck
pre = 0
timeoutCount = 0
@@ -427,6 +427,24 @@ def check502Task():
time.sleep(600);
check502Task();
# 检查面板证书是否有更新
def check_panel_ssl():
try:
while True:
lets_info = public.readFile("/www/server/panel/ssl/lets.info")
if lets_info:
lets_info = json.loads(lets_info)
cert_info_file = "/www/server/panel/vhost/ssl/" + lets_info["domain"] + "/info.json"
cert_info = public.readFile(cert_info_file)
if cert_info:
cert_info = json.loads(cert_info)
if setPanelLets.setPanelLets().copy_cert(cert_info):
strTime = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(int(time.time())))
public.writeFile("/tmp/panelSSL.pl","{} Panel certificate updated successfully".format(strTime))
time.sleep(60)
except:
e = public.get_error_info()
public.writeFile("/tmp/panelSSL.pl", str(e))
#监控面板状态
def panel_status():
@@ -563,6 +581,10 @@ if __name__ == "__main__":
p.setDaemon(True)
p.start()
p = threading.Thread(target=check_panel_ssl)
p.setDaemon(True)
p.start()
task_obj = panelTask.bt_task()
p = threading.Thread(target=task_obj.start_task)
p.setDaemon(True)