File 0001-path.config-defaults-to-etc-beats.patch of Package beats

From 4099b0adc47812f8e15b19e2659709ef43a7308d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= <kkaempf@suse.de>
Date: Wed, 24 Jul 2019 17:41:34 +0200
Subject: [PATCH] path.config defaults to /etc/beats

---
 libbeat/cfgfile/cfgfile.go | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/libbeat/cfgfile/cfgfile.go b/libbeat/cfgfile/cfgfile.go
index b0c9f7ffd220..6601e21a6804 100644
--- a/libbeat/cfgfile/cfgfile.go
+++ b/libbeat/cfgfile/cfgfile.go
@@ -38,7 +38,7 @@ var (
 	defaults = common.MustNewConfigFrom(map[string]interface{}{
 		"path": map[string]interface{}{
 			"home":   ".", // to be initialized by beat
-			"config": "${path.home}",
+			"config": "/etc/beats",
 			"data":   fmt.Sprint("${path.home}", string(os.PathSeparator), "data"),
 			"logs":   fmt.Sprint("${path.home}", string(os.PathSeparator), "logs"),
 		},
@@ -209,9 +209,7 @@ func LoadList(file string) ([]*common.Config, error) {
 func GetPathConfig() string {
 	if *configPath != "" {
 		return *configPath
-	} else if *homePath != "" {
-		return *homePath
 	}
 	// TODO: Do we need this or should we always return *homePath?
-	return ""
+	return "/etc/beats"
 }
-- 
2.23.0

openSUSE Build Service is sponsored by