This commit is contained in:
parent
0a69659f52
commit
d3f7924ddd
|
|
@ -5,6 +5,7 @@ import time
|
|||
import os
|
||||
import re
|
||||
import math
|
||||
import json
|
||||
|
||||
from flask import Flask, session
|
||||
|
||||
|
|
@ -514,6 +515,15 @@ class system_api:
|
|||
|
||||
return public.returnJson(True, "设置成功!")
|
||||
|
||||
# 更新服务
|
||||
def updateServer(self, type):
|
||||
try:
|
||||
if not public.isRestart():
|
||||
return public.returnMsg(False, '请等待所有安装任务完成再执行!')
|
||||
|
||||
except Exception as ex:
|
||||
return public.returnJson(False, "连接服务器失败!")
|
||||
|
||||
# 重启面板
|
||||
def reWeb(self, get):
|
||||
# if not public.IsRestart(): return
|
||||
|
|
|
|||
|
|
@ -24,8 +24,9 @@ def network():
|
|||
|
||||
|
||||
@system.route("/update_server")
|
||||
def updatePanel():
|
||||
return public.returnJson(False, "12")
|
||||
def updateServer():
|
||||
data = system_api.system_api().updateServer('update')
|
||||
return data
|
||||
|
||||
|
||||
@system.route("/system_total")
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ Install_OpenSSL()
|
|||
{
|
||||
if [ ! -d ${libPath}/openssl ];then
|
||||
cd ${sourcePath}
|
||||
if [ ! -f ${sourcePath}openssl-1.0.2q.tar.gz ];then
|
||||
if [ ! -f ${sourcePath}/openssl-1.0.2q.tar.gz ];then
|
||||
wget https://github.com/midoks/mdserver-web/releases/download/init/openssl-1.0.2q.tar.gz -T 20
|
||||
fi
|
||||
tar -zxf openssl-1.0.2q.tar.gz
|
||||
|
|
|
|||
|
|
@ -498,6 +498,26 @@ function checkUpdate() {
|
|||
},'json');
|
||||
}
|
||||
|
||||
function updateMsg(){
|
||||
window.open("http://www.bt.cn/bbs/thread-1186-1-1.html");
|
||||
$.get('/ajax?action=UpdatePanel',function(rdata){
|
||||
layer.open({
|
||||
type:1,
|
||||
title:lan.index.update_to+'['+rdata.version+']',
|
||||
area: '400px',
|
||||
shadeClose:false,
|
||||
closeBtn:2,
|
||||
content:'<div class="setchmod bt-form pd20 pb70">'
|
||||
+'<p style="padding: 0 0 10px;line-height: 24px;">'+rdata.updateMsg+'</p>'
|
||||
+'<div class="bt-form-submit-btn">'
|
||||
+'<button type="button" class="btn btn-danger btn-sm btn-title" onclick="layer.closeAll()">'+lan.public.cancel+'</button>'
|
||||
+'<button type="button" class="btn btn-success btn-sm btn-title" onclick="updateVersion(\''+rdata.version+'\')" >'+lan.index.update_go+'</button>'
|
||||
+'</div>'
|
||||
+'</div>'
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//开始升级
|
||||
function updateVersion(version) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue