From ed37b02fff3175f91257eb0388fd855260a5071f Mon Sep 17 00:00:00 2001 From: "bt.cn" <31841517+aaPanel@users.noreply.github.com> Date: Wed, 1 Sep 2021 16:03:04 +0800 Subject: [PATCH] #Fix the problem that the stop page of the website is overwritten #Other optimization --- class/panelSite.py | 6 +++--- class/public.py | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/class/panelSite.py b/class/panelSite.py index 04b2f305..105d8ab5 100644 --- a/class/panelSite.py +++ b/class/panelSite.py @@ -42,7 +42,7 @@ class panelSite(panelRedirect): path = self.setupPath + '/stop' if not os.path.exists(path + '/index.html'): public.ExecShell('mkdir -p ' + path) - public.ExecShell('wget -O ' + path + '/index.html ' + public.get_url() + '/stop.html &') + public.ExecShell('wget -O ' + path + '/index.html ' + public.get_url() + '/stop_en.html &') self.__proxyfile = '/www/server/panel/data/proxyfile.json' self.OldConfigFile() if os.path.exists(self.nginx_conf_bak): os.remove(self.nginx_conf_bak) @@ -2230,8 +2230,8 @@ listener SSL443 { os.makedirs(path) public.downloadFile('http://download.bt.cn/stop_en.html', path + '/index.html') - if 'This site has been closed by administrator' not in public.readFile(path + '/index.html'): - public.downloadFile('http://download.bt.cn/stop_en.html', path + '/index.html') + # if 'This site has been closed by administrator' not in public.readFile(path + '/index.html'): + # public.downloadFile('http://download.bt.cn/stop_en.html', path + '/index.html') binding = public.M('binding').where('pid=?', (id,)).field('id,pid,domain,path,port,addtime').select() for b in binding: diff --git a/class/public.py b/class/public.py index 76ce83bc..65333e7a 100644 --- a/class/public.py +++ b/class/public.py @@ -590,6 +590,9 @@ def GetClientIp(): from flask import request return request.remote_addr.replace('::ffff:', '') +def get_client_ip(): + return GetClientIp() + def phpReload(version): # 重载PHP配置 import os