Merge branch 'master' into wip
[src/xds/xds-agent.git] / lib / xdsconfig / configfile.go
index a47038b..e3737f4 100644 (file)
@@ -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/ <current_dir>/agent-config.json file
-//  4/ <executable dir>/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 {