From cdfb8c4a4045dc07a588280d09f00c9d6a55ae7f Mon Sep 17 00:00:00 2001 From: Andrew Kroh Date: Mon, 31 Jul 2017 12:00:11 -0400 Subject: [PATCH] Update init scripts to use "test config" subcommand Using "-configtest" is deprecated and the "[beat] test config" subcommand should be used instead. Fixes #4600 --- CHANGELOG.asciidoc | 2 ++ dev-tools/packer/platforms/centos/init.j2 | 2 +- dev-tools/packer/platforms/debian/init.j2 | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 8d52e5b23a9..591bc2bced9 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -48,6 +48,8 @@ https://github.com/elastic/beats/compare/v6.0.0-beta1...master[Check the HEAD di *Affecting all Beats* +- Update init scripts to use the `test config` subcommand instead of the deprecated `-configtest` flag. {issue}4600[4600] + *Filebeat* *Heartbeat* diff --git a/dev-tools/packer/platforms/centos/init.j2 b/dev-tools/packer/platforms/centos/init.j2 index ea5d58c6f90..f713575539e 100755 --- a/dev-tools/packer/platforms/centos/init.j2 +++ b/dev-tools/packer/platforms/centos/init.j2 @@ -26,7 +26,7 @@ export PATH pidfile=${PIDFILE-/var/run/{{.beat_pkg_name}}.pid} agent=${BEATS_AGENT-/usr/share/{{.beat_name}}/bin/{{.beat_name}}} args="-c /etc/{{.beat_name}}/{{.beat_name}}.yml -path.home /usr/share/{{.beat_name}} -path.config /etc/{{.beat_name}} -path.data /var/lib/{{.beat_name}} -path.logs /var/log/{{.beat_name}}" -test_args="-e -configtest" +test_args="-e test config" beat_user="${BEAT_USER:-root}" wrapper="/usr/share/{{.beat_name}}/bin/{{.beat_name}}-god" wrapperopts="-r / -n -p $pidfile" diff --git a/dev-tools/packer/platforms/debian/init.j2 b/dev-tools/packer/platforms/debian/init.j2 index 5ffab16d9c2..04c24242d81 100755 --- a/dev-tools/packer/platforms/debian/init.j2 +++ b/dev-tools/packer/platforms/debian/init.j2 @@ -18,7 +18,7 @@ DESC="{{.beat_description}}" NAME="{{.beat_name}}" DAEMON=/usr/share/{{.beat_name}}/bin/$NAME DAEMON_ARGS="-c /etc/{{.beat_name}}/{{.beat_name}}.yml -path.home /usr/share/{{.beat_name}} -path.config /etc/{{.beat_name}} -path.data /var/lib/{{.beat_name}} -path.logs /var/log/{{.beat_name}}" -TEST_ARGS="-e -configtest" +TEST_ARGS="-e test config" PIDFILE=/var/run/{{.beat_pkg_name}}.pid WRAPPER="/usr/share/{{.beat_name}}/bin/{{.beat_name}}-god" BEAT_USER="root"