Fix #240
This commit is contained in:
parent
78ac45ae24
commit
5259b54304
24
conf/wide.go
24
conf/wide.go
|
@ -195,19 +195,16 @@ func initWide(confPath, confIP, confPort, confServer, confLogLevel, confStaticSe
|
||||||
}
|
}
|
||||||
|
|
||||||
// IP
|
// IP
|
||||||
ip, err := util.Net.LocalIP()
|
ip := ""
|
||||||
if err != nil {
|
|
||||||
logger.Error(err)
|
|
||||||
|
|
||||||
os.Exit(-1)
|
|
||||||
}
|
|
||||||
|
|
||||||
logger.Debugf("${ip} [%s]", ip)
|
|
||||||
|
|
||||||
Docker = confDocker
|
|
||||||
|
|
||||||
if "" != confIP {
|
if "" != confIP {
|
||||||
ip = confIP
|
ip = confIP
|
||||||
|
} else {
|
||||||
|
ip, err = util.Net.LocalIP()
|
||||||
|
if nil != err {
|
||||||
|
logger.Error(err)
|
||||||
|
|
||||||
|
os.Exit(-1)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Wide.IP = strings.Replace(Wide.IP, "${ip}", ip, 1)
|
Wide.IP = strings.Replace(Wide.IP, "${ip}", ip, 1)
|
||||||
|
@ -216,6 +213,11 @@ func initWide(confPath, confIP, confPort, confServer, confLogLevel, confStaticSe
|
||||||
Wide.Port = confPort
|
Wide.Port = confPort
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logger.Debugf("${ip} [%s]", ip)
|
||||||
|
|
||||||
|
// Docker flag
|
||||||
|
Docker = confDocker
|
||||||
|
|
||||||
// Server
|
// Server
|
||||||
Wide.Server = strings.Replace(Wide.Server, "{IP}", Wide.IP, 1)
|
Wide.Server = strings.Replace(Wide.Server, "{IP}", Wide.IP, 1)
|
||||||
Wide.Server = strings.Replace(Wide.Server, "{Port}", Wide.Port, 1)
|
Wide.Server = strings.Replace(Wide.Server, "{Port}", Wide.Port, 1)
|
||||||
|
|
Loading…
Reference in New Issue