This commit is contained in:
parent
0780cdb04f
commit
42093ebfc1
12
conf/wide.go
12
conf/wide.go
|
@ -195,26 +195,24 @@ func initWide(confPath, confIP, confPort, confServer, confLogLevel, confStaticSe
|
|||
}
|
||||
|
||||
// IP
|
||||
ip := ""
|
||||
if "" != confIP {
|
||||
ip = confIP
|
||||
Wide.IP = confIP
|
||||
} else {
|
||||
ip, err = util.Net.LocalIP()
|
||||
ip, err := util.Net.LocalIP()
|
||||
if nil != err {
|
||||
logger.Error(err)
|
||||
|
||||
os.Exit(-1)
|
||||
}
|
||||
}
|
||||
|
||||
Wide.IP = strings.Replace(Wide.IP, "${ip}", ip, 1)
|
||||
logger.Debugf("${ip} [%s]", ip)
|
||||
Wide.IP = strings.Replace(Wide.IP, "${ip}", ip, 1)
|
||||
}
|
||||
|
||||
if "" != confPort {
|
||||
Wide.Port = confPort
|
||||
}
|
||||
|
||||
logger.Debugf("${ip} [%s]", ip)
|
||||
|
||||
// Docker flag
|
||||
Docker = confDocker
|
||||
|
||||
|
|
Loading…
Reference in New Issue