summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-admin/filebeat/files')
-rw-r--r--app-admin/filebeat/files/filebeat.initd17
1 files changed, 5 insertions, 12 deletions
diff --git a/app-admin/filebeat/files/filebeat.initd b/app-admin/filebeat/files/filebeat.initd
index 01fccad2ea33..92b8369a41d7 100644
--- a/app-admin/filebeat/files/filebeat.initd
+++ b/app-admin/filebeat/files/filebeat.initd
@@ -12,11 +12,12 @@ 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"
+command_user="${FILEBEAT_USER}:${FILEBEAT_GROUP}"
+extra_commands="checkconfig"
+pidfile="/run/filebeat.pid"
+retry="TERM/5/KILL/5"
+start_stop_daemon_args="--chdir ${FILEBEAT_DATADIR}"
depend() {
use net
@@ -37,14 +38,6 @@ checkconfig() {
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
-}