chore: dry run core upgrade in demo

This commit is contained in:
0xJacky 2023-05-21 09:46:59 +08:00
parent 0265e44c17
commit b1b6e8fec8
No known key found for this signature in database
GPG key ID: B6E4A6E4A561BAF0
2 changed files with 122 additions and 120 deletions

View file

@ -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

View file

@ -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
}