summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Delaney <idella4@gentoo.org>2015-11-10 23:33:12 +0800
committerIan Delaney <idella4@gentoo.org>2015-11-11 00:06:35 +0800
commit7c16ae5036fe627d9b13e7cd58cdb6fcb9f1b7ed (patch)
treece5c7ff4134a434d8c3b47c863ed5ef5819e838b /app-admin/logstash-bin/files
parentdev-java/jarjar: Clean up old. (diff)
downloadgentoo-7c16ae5036fe627d9b13e7cd58cdb6fcb9f1b7ed.tar.gz
gentoo-7c16ae5036fe627d9b13e7cd58cdb6fcb9f1b7ed.tar.bz2
gentoo-7c16ae5036fe627d9b13e7cd58cdb6fcb9f1b7ed.zip
app-admin/logstash-bin: bump to version 1.5.5
init scripts updated with confd-r1 && initd-r1 patches and scripts porvided by proxy maintianer in gentoo bug Gentoo bug: #564608 Package-Manager: portage-2.2.24
Diffstat (limited to 'app-admin/logstash-bin/files')
-rw-r--r--app-admin/logstash-bin/files/logstash.confd-r17
-rw-r--r--app-admin/logstash-bin/files/logstash.initd-r144
2 files changed, 51 insertions, 0 deletions
diff --git a/app-admin/logstash-bin/files/logstash.confd-r1 b/app-admin/logstash-bin/files/logstash.confd-r1
new file mode 100644
index 000000000000..b101e86c8c99
--- /dev/null
+++ b/app-admin/logstash-bin/files/logstash.confd-r1
@@ -0,0 +1,7 @@
+#LS_USER="root"
+#LS_GROUP="root"
+#LS_CONFDIR="/etc/logstash/conf.d"
+#LS_LOGFILE="/var/log/logstash/logstash.log"
+#LS_PIDFILE="/run/logstash/logstash.pid"
+#LS_HEAP_SIZE="500m"
+#LS_OPTS=""
diff --git a/app-admin/logstash-bin/files/logstash.initd-r1 b/app-admin/logstash-bin/files/logstash.initd-r1
new file mode 100644
index 000000000000..c65f098c2151
--- /dev/null
+++ b/app-admin/logstash-bin/files/logstash.initd-r1
@@ -0,0 +1,44 @@
+#!/sbin/openrc-run
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+LS_USER="${LS_USER:-root}"
+LS_GROUP="${LS_GROUP:-root}"
+LS_CONFDIR="${LS_CONFDIR:-/etc/logstash/conf.d}"
+LS_LOGFILE="${LS_LOGFILE:-/var/log/logstash/logstash.log}"
+LS_PIDFILE="${LS_PIDFILE:-/run/logstash/logstash.pid}"
+LS_HEAP_SIZE="${LS_HEAP_SIZE:-500m}"
+
+command="/opt/logstash/bin/logstash"
+command_args="agent --config ${LS_CONFDIR}/*.conf --log ${LS_LOGFILE} ${LS_OPTS}"
+extra_commands="checkconfig"
+command_background="true"
+start_stop_daemon_args="--user=${LS_USER}:${LS_GROUP} \
+ --env LS_HEAP_SIZE=${LS_HEAP_SIZE}"
+pidfile="${LS_PIDFILE}"
+
+depend() {
+ use net
+ after elasticsearch
+}
+
+checkconfig() {
+ ebegin "Checking your configuration"
+ ${command} ${command_args} --configtest
+ eend $? "Configuration error. Please fix your configuration files."
+}
+
+start_pre() {
+ checkconfig || return 1
+
+ checkpath -d -o "${LS_USER}":"${LS_GROUP}" -m750 "$(dirname "${LS_PIDFILE}")"
+ checkpath -d -o "${LS_USER}":"${LS_GROUP}" -m750 "$(dirname "${LS_LOGFILE}")"
+ checkpath -f -o "${LS_USER}":"${LS_GROUP}" -m640 "${LS_LOGFILE}"
+}
+
+stop() {
+ ebegin "Stopping logstash"
+ start-stop-daemon --stop \
+ --pidfile="${LS_PIDFILE}" \
+ --retry=TERM/5/KILL/5
+}