mirror of
https://github.com/kenzok8/small-package
synced 2025-09-18 18:51:16 +08:00
update-12.28
This commit is contained in:
@ -119,12 +119,23 @@ function check_version() {
|
||||
if (r.code == 1) {
|
||||
XHR.poll(1, '<%=url([[admin]], [[services]], [[easyupdate]], [[getlog]])%>', null,(x, r) => {
|
||||
update_status_message('notice', r.data);
|
||||
if (r.data.indexOf("Commencing upgrade") > -1 ){
|
||||
if (r.data.indexOf("Image check failed.") > -1){
|
||||
XHR.halt()
|
||||
setTimeout(() => {
|
||||
location.replace(document.location.origin)
|
||||
},180000);
|
||||
update_status_message('warning', r.data);
|
||||
document.getElementById('update_apply_overlay').addEventListener("click", (e)=>{
|
||||
update_status_message()
|
||||
})
|
||||
}else{
|
||||
if (r.data.indexOf("Commencing upgrade") > -1 ){
|
||||
XHR.halt()
|
||||
setTimeout(() => {
|
||||
location.replace(document.location.origin)
|
||||
},180000);
|
||||
}else{
|
||||
update_status_message('notice', r.data);
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
} else {
|
||||
tb.disabled = false;
|
||||
|
@ -68,7 +68,7 @@ function flashFirmware() {
|
||||
echo 'Get whether to save the configuration(读取是否保存配置)'
|
||||
keepconfig=$(uci get easyupdate.main.keepconfig)
|
||||
if [ $keepconfig -eq 1 ]; then
|
||||
keepconfig=''
|
||||
keepconfig=' '
|
||||
res='yes'
|
||||
else
|
||||
keepconfig='-n '
|
||||
@ -76,7 +76,7 @@ function flashFirmware() {
|
||||
fi
|
||||
echo "Whether to save the configuration(读取是否保存配置):$res"
|
||||
echo 'Start flash firmware, log output in /tmp/easyupdate.log(开始刷写固件,日志输出在/tmp/easyupdate.log)'
|
||||
sysupgrade $keepconfig"/tmp/$file" >/tmp/easyupdate.log 2>&1 &
|
||||
sysupgrade $keepconfig$file >/tmp/easyupdate.log 2>&1 &
|
||||
fi
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user