[agent-go] - 去除本地环境信息的默认设置,优化启动逻辑
This commit is contained in:
@@ -13,11 +13,11 @@ func main() {
|
||||
|
||||
// 解析命令行参数
|
||||
var version string
|
||||
var agentServerInfoConfFile string
|
||||
//var agentServerInfoConfFile string
|
||||
var mode string
|
||||
flag.StringVar(&version, "version", "", "config file version")
|
||||
flag.StringVar(&mode, "mode", "agent", "agent run mode")
|
||||
flag.StringVar(&agentServerInfoConfFile, "agentServerInfoConfFile", "", "agent server info conf file")
|
||||
//flag.StringVar(&agentServerInfoConfFile, "agentServerInfoConfFile", "", "agent server info conf file")
|
||||
flag.Parse()
|
||||
|
||||
if mode == "bastion" {
|
||||
@@ -30,10 +30,10 @@ func main() {
|
||||
// 读取对应版本的配置文件
|
||||
octopusAgentConfigFileName := fmt.Sprintf("octopus-agent-%s.yaml", version)
|
||||
fmt.Println("config file name is => " + octopusAgentConfigFileName)
|
||||
fmt.Println("agent server info file is => " + agentServerInfoConfFile)
|
||||
//fmt.Println("agent server info file is => " + agentServerInfoConfFile)
|
||||
|
||||
// 执行初始化之策工作
|
||||
businessForeverChan := a_init.INIT(octopusAgentConfigFileName, agentServerInfoConfFile)
|
||||
businessForeverChan := a_init.INIT(octopusAgentConfigFileName)
|
||||
|
||||
// 永远等待 runtime的队列消息
|
||||
<-businessForeverChan
|
||||
|
||||
Reference in New Issue
Block a user