mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-10 18:05:48 +02:00
fix: settings init issue #66
This commit is contained in:
parent
83883c1ab9
commit
4c54a9e43d
1 changed files with 8 additions and 8 deletions
16
main.go
16
main.go
|
@ -21,6 +21,14 @@ import (
|
|||
)
|
||||
|
||||
func main() {
|
||||
var confPath string
|
||||
flag.StringVar(&confPath, "config", "app.ini", "Specify the configuration file")
|
||||
flag.Parse()
|
||||
|
||||
settings.Init(confPath)
|
||||
|
||||
gin.SetMode(settings.ServerSettings.RunMode)
|
||||
|
||||
r, err := service.GetRuntimeInfo()
|
||||
|
||||
if err != nil {
|
||||
|
@ -33,7 +41,6 @@ func main() {
|
|||
Fetcher: &fetcher.File{Path: r.ExPath},
|
||||
TerminateTimeout: 0,
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
func prog(state overseer.State) {
|
||||
|
@ -41,13 +48,6 @@ func prog(state overseer.State) {
|
|||
// See https://github.com/golang/go/issues/32350
|
||||
_ = mime.AddExtensionType(".js", "text/javascript; charset=utf-8")
|
||||
|
||||
var confPath string
|
||||
flag.StringVar(&confPath, "config", "app.ini", "Specify the configuration file")
|
||||
flag.Parse()
|
||||
|
||||
gin.SetMode(settings.ServerSettings.RunMode)
|
||||
|
||||
settings.Init(confPath)
|
||||
log.Printf("Nginx config dir path: %s", nginx.GetConfPath())
|
||||
if "" != settings.ServerSettings.JwtSecret {
|
||||
model.Init()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue