#Fix the problem that the stop page of the website is overwritten

#Other optimization
This commit is contained in:
bt.cn
2021-09-01 16:03:04 +08:00
parent a56128ae30
commit ed37b02fff
2 changed files with 6 additions and 3 deletions
+3 -3
View File
@@ -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:
+3
View File
@@ -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