X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=lib%2Fxdsconfig%2Fconfigfile.go;h=e3737f420f3467e8300a454825504a153a218467;hb=2d90eac319979dba64371258b30e61e77a15db7d;hp=a47038b214686e45b91b7665f5b4a78586d25c70;hpb=97ca1f277dc8b6973d6fa67add5593a9c395ce60;p=src%2Fxds%2Fxds-agent.git diff --git a/lib/xdsconfig/configfile.go b/lib/xdsconfig/configfile.go index a47038b..e3737f4 100644 --- a/lib/xdsconfig/configfile.go +++ b/lib/xdsconfig/configfile.go @@ -26,10 +26,10 @@ type XDSServerConf struct { } type FileConfig struct { - HTTPPort string `json:"httpPort"` - WebAppDir string `json:"webAppDir"` - LogsDir string `json:"logsDir"` - // SEB A SUP ? XDSAPIKey string `json:"xds-apikey"` + HTTPPort string `json:"httpPort"` + WebAppDir string `json:"webAppDir"` + LogsDir string `json:"logsDir"` + XDSAPIKey string `json:"xds-apikey"` ServersConf []XDSServerConf `json:"xdsServers"` SThgConf *SyncThingConf `json:"syncthing"` } @@ -38,8 +38,7 @@ type FileConfig struct { // Order to determine which config file is used: // 1/ from command line option: "--config myConfig.json" // 2/ $HOME/.xds/agent/agent-config.json file -// 3/ /agent-config.json file -// 4/ /agent-config.json file +// 3/ /etc/xds-agent/config.json file func readGlobalConfig(c *Config, confFile string) error { @@ -53,8 +52,6 @@ func readGlobalConfig(c *Config, confFile string) error { searchIn = append(searchIn, "/etc/xds-agent/agent-config.json") - searchIn = append(searchIn, path.Join(common.GetExePath(), "agent-config.json")) - var cFile *string for _, p := range searchIn { if _, err := os.Stat(p); err == nil {