mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-12 02:45:49 +02:00
chore: dry run core upgrade in demo
This commit is contained in:
parent
0265e44c17
commit
b1b6e8fec8
2 changed files with 122 additions and 120 deletions
|
@ -6,6 +6,7 @@ Email = test@jackyu.cn
|
|||
HTTPChallengePort = 9180
|
||||
StartCmd = bash
|
||||
NodeSecret = fdc7764f-92d2-454c-9640-6a09be121139
|
||||
Demo = true
|
||||
|
||||
[nginx_log]
|
||||
AccessLogPath = /var/log/nginx/access.local.log
|
||||
|
|
|
@ -3,6 +3,7 @@ package api
|
|||
import (
|
||||
"github.com/0xJacky/Nginx-UI/server/internal/logger"
|
||||
"github.com/0xJacky/Nginx-UI/server/internal/upgrader"
|
||||
"github.com/0xJacky/Nginx-UI/server/settings"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/gorilla/websocket"
|
||||
"net/http"
|
||||
|
@ -122,7 +123,7 @@ func PerformCoreUpgrade(c *gin.Context) {
|
|||
"message": "Performing core upgrade",
|
||||
})
|
||||
// dry run
|
||||
if control.DryRun {
|
||||
if control.DryRun || settings.ServerSettings.Demo {
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue