diff options
author | Tomas Mozes <tmozes@sygic.com> | 2017-01-20 13:16:24 +0100 |
---|---|---|
committer | Patrice Clement <monsieurp@gentoo.org> | 2017-01-21 14:36:41 +0100 |
commit | 6d08ccfa96f2373419a184fcaa899cfa24157243 (patch) | |
tree | 1fd21b1924e9601e197758b13e6f2b4ae7965d7f /app-admin/filebeat/files | |
parent | app-admin/filebeat: verson bump to 5.1.2. (diff) | |
download | gentoo-6d08ccfa96f2373419a184fcaa899cfa24157243.tar.gz gentoo-6d08ccfa96f2373419a184fcaa899cfa24157243.tar.bz2 gentoo-6d08ccfa96f2373419a184fcaa899cfa24157243.zip |
app-admin/filebeat: drop old.
Closes: https://github.com/gentoo/gentoo/pull/3561
Diffstat (limited to 'app-admin/filebeat/files')
-rw-r--r-- | app-admin/filebeat/files/filebeat.confd | 7 | ||||
-rw-r--r-- | app-admin/filebeat/files/filebeat.confd-r1 | 15 | ||||
-rw-r--r-- | app-admin/filebeat/files/filebeat.initd | 15 | ||||
-rw-r--r-- | app-admin/filebeat/files/filebeat.initd-r1 | 50 |
4 files changed, 14 insertions, 73 deletions
diff --git a/app-admin/filebeat/files/filebeat.confd b/app-admin/filebeat/files/filebeat.confd index 88b7408d7bb0..2fcf41aa3322 100644 --- a/app-admin/filebeat/files/filebeat.confd +++ b/app-admin/filebeat/files/filebeat.confd @@ -5,8 +5,11 @@ # Configuration path #FILEBEAT_CONFIG="" -# Path to state directory -#FILEBEAT_STATEDIR="" +# Path to data directory +#FILEBEAT_DATADIR="" + +# Path to log directory +#FILEBEAT_LOGDIR="" # Additional arguments passed to filebeat #FILEBEAT_OPTS="" diff --git a/app-admin/filebeat/files/filebeat.confd-r1 b/app-admin/filebeat/files/filebeat.confd-r1 deleted file mode 100644 index 2fcf41aa3322..000000000000 --- a/app-admin/filebeat/files/filebeat.confd-r1 +++ /dev/null @@ -1,15 +0,0 @@ -# Run filebeat under this user/group -#FILEBEAT_USER="" -#FILEBEAT_GROUP="" - -# Configuration path -#FILEBEAT_CONFIG="" - -# Path to data directory -#FILEBEAT_DATADIR="" - -# Path to log directory -#FILEBEAT_LOGDIR="" - -# Additional arguments passed to filebeat -#FILEBEAT_OPTS="" diff --git a/app-admin/filebeat/files/filebeat.initd b/app-admin/filebeat/files/filebeat.initd index 3eb2fcafbf8b..da18022c20d7 100644 --- a/app-admin/filebeat/files/filebeat.initd +++ b/app-admin/filebeat/files/filebeat.initd @@ -1,19 +1,21 @@ #!/sbin/openrc-run -# Copyright 1999-2016 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 FILEBEAT_USER="${FILEBEAT_USER:-root}" FILEBEAT_GROUP="${FILEBEAT_GROUP:-root}" FILEBEAT_CONFIG="${FILEBEAT_CONFIG:-/etc/filebeat/filebeat.yml}" -FILEBEAT_STATEDIR="${FILEBEAT_STATEDIR:-/var/lib/filebeat}" +FILEBEAT_DATADIR="${FILEBEAT_DATADIR:-/var/lib/filebeat}" +FILEBEAT_LOGDIR="${FILEBEAT_LOGDIR:-/var/log/filebeat}" FILEBEAT_OPTS="${FILEBEAT_OPTS:-}" command="/usr/bin/filebeat" -command_args="-c ${FILEBEAT_CONFIG} ${FILEBEAT_OPTS}" +command_args="-c ${FILEBEAT_CONFIG} ${FILEBEAT_OPTS} -path.config $(dirname $FILEBEAT_CONFIG) \ + -path.data ${FILEBEAT_DATADIR} -path.home ${FILEBEAT_DATADIR} -path.logs ${FILEBEAT_LOGDIR}" extra_commands="checkconfig" command_background="true" start_stop_daemon_args="--user ${FILEBEAT_USER}:${FILEBEAT_GROUP} \ - --chdir ${FILEBEAT_STATEDIR}" + --chdir ${FILEBEAT_DATADIR}" pidfile="/run/filebeat/filebeat.pid" depend() { @@ -26,7 +28,7 @@ checkconfig() { eend "Please create a configuration file at ${FILEBEAT_CONFIG}" return 1 fi - + ebegin "Checking your configuration" ${command} ${command_args} -configtest eend $? "Configuration error. Please fix your configuration files." @@ -36,7 +38,8 @@ start_pre() { checkconfig || return 1 checkpath -d -o "${FILEBEAT_USER}":"${FILEBEAT_GROUP}" -m750 "$(dirname "${pidfile}")" - checkpath -d -o "${FILEBEAT_USER}":"${FILEBEAT_GROUP}" -m750 "${FILEBEAT_STATEDIR}" + checkpath -d -o "${FILEBEAT_USER}":"${FILEBEAT_GROUP}" -m750 "${FILEBEAT_DATADIR}" + checkpath -d -o "${FILEBEAT_USER}":"${FILEBEAT_GROUP}" -m750 "${FILEBEAT_LOGDIR}" } stop() { diff --git a/app-admin/filebeat/files/filebeat.initd-r1 b/app-admin/filebeat/files/filebeat.initd-r1 deleted file mode 100644 index cec6142bd994..000000000000 --- a/app-admin/filebeat/files/filebeat.initd-r1 +++ /dev/null @@ -1,50 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -FILEBEAT_USER="${FILEBEAT_USER:-root}" -FILEBEAT_GROUP="${FILEBEAT_GROUP:-root}" -FILEBEAT_CONFIG="${FILEBEAT_CONFIG:-/etc/filebeat/filebeat.yml}" -FILEBEAT_DATADIR="${FILEBEAT_DATADIR:-/var/lib/filebeat}" -FILEBEAT_LOGDIR="${FILEBEAT_LOGDIR:-/var/log/filebeat}" -FILEBEAT_OPTS="${FILEBEAT_OPTS:-}" - -command="/usr/bin/filebeat" -command_args="-c ${FILEBEAT_CONFIG} ${FILEBEAT_OPTS} -path.config $(dirname $FILEBEAT_CONFIG) \ - -path.data ${FILEBEAT_DATADIR} -path.home ${FILEBEAT_DATADIR} -path.logs ${FILEBEAT_LOGDIR}" -extra_commands="checkconfig" -command_background="true" -start_stop_daemon_args="--user ${FILEBEAT_USER}:${FILEBEAT_GROUP} \ - --chdir ${FILEBEAT_DATADIR}" -pidfile="/run/filebeat/filebeat.pid" - -depend() { - use net - after elasticsearch -} - -checkconfig() { - if [[ ! -e ${FILEBEAT_CONFIG} ]]; then - eend "Please create a configuration file at ${FILEBEAT_CONFIG}" - return 1 - fi - - ebegin "Checking your configuration" - ${command} ${command_args} -configtest - eend $? "Configuration error. Please fix your configuration files." -} - -start_pre() { - checkconfig || return 1 - - checkpath -d -o "${FILEBEAT_USER}":"${FILEBEAT_GROUP}" -m750 "$(dirname "${pidfile}")" - checkpath -d -o "${FILEBEAT_USER}":"${FILEBEAT_GROUP}" -m750 "${FILEBEAT_DATADIR}" - checkpath -d -o "${FILEBEAT_USER}":"${FILEBEAT_GROUP}" -m750 "${FILEBEAT_LOGDIR}" -} - -stop() { - ebegin "Stopping filebeat" - start-stop-daemon --stop \ - --pidfile=${pidfile} \ - --retry=TERM/5/KILL/5 -} |