mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-12 10:55:51 +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
|
HTTPChallengePort = 9180
|
||||||
StartCmd = bash
|
StartCmd = bash
|
||||||
NodeSecret = fdc7764f-92d2-454c-9640-6a09be121139
|
NodeSecret = fdc7764f-92d2-454c-9640-6a09be121139
|
||||||
|
Demo = true
|
||||||
|
|
||||||
[nginx_log]
|
[nginx_log]
|
||||||
AccessLogPath = /var/log/nginx/access.local.log
|
AccessLogPath = /var/log/nginx/access.local.log
|
||||||
|
|
|
@ -3,6 +3,7 @@ package api
|
||||||
import (
|
import (
|
||||||
"github.com/0xJacky/Nginx-UI/server/internal/logger"
|
"github.com/0xJacky/Nginx-UI/server/internal/logger"
|
||||||
"github.com/0xJacky/Nginx-UI/server/internal/upgrader"
|
"github.com/0xJacky/Nginx-UI/server/internal/upgrader"
|
||||||
|
"github.com/0xJacky/Nginx-UI/server/settings"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/gorilla/websocket"
|
"github.com/gorilla/websocket"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
@ -122,7 +123,7 @@ func PerformCoreUpgrade(c *gin.Context) {
|
||||||
"message": "Performing core upgrade",
|
"message": "Performing core upgrade",
|
||||||
})
|
})
|
||||||
// dry run
|
// dry run
|
||||||
if control.DryRun {
|
if control.DryRun || settings.ServerSettings.Demo {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue