mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 10:25:52 +02:00
refactor: replace upgrader with version package for runtime and release information
This commit is contained in:
parent
8e212ae79b
commit
d0cf93d5e3
11 changed files with 182 additions and 121 deletions
|
@ -2,10 +2,10 @@ package settings
|
|||
|
||||
import (
|
||||
"log"
|
||||
"os"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/0xJacky/Nginx-UI/internal/helper"
|
||||
"github.com/caarlos0/env/v11"
|
||||
"github.com/elliotchance/orderedmap/v3"
|
||||
"github.com/spf13/cast"
|
||||
|
@ -81,7 +81,7 @@ func Init(confPath string) {
|
|||
|
||||
// if in official docker, set the restart cmd of nginx to "nginx -s stop",
|
||||
// then the supervisor of s6-overlay will start the nginx again.
|
||||
if cast.ToBool(os.Getenv("NGINX_UI_OFFICIAL_DOCKER")) {
|
||||
if helper.InNginxUIOfficialDocker() {
|
||||
NginxSettings.RestartCmd = "nginx -s stop"
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue