diff options
Diffstat (limited to 'testing/logstash/logstash.initd')
-rw-r--r-- | testing/logstash/logstash.initd | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/testing/logstash/logstash.initd b/testing/logstash/logstash.initd new file mode 100644 index 0000000000..e7e8ed7a2c --- /dev/null +++ b/testing/logstash/logstash.initd @@ -0,0 +1,25 @@ +#!/sbin/runscript + +depends() { + needs network + provide logstash +} + +description="logstash" +command="/usr/share/logstash/bin/logstash" +pidfile="/var/run/logstash/logstash.pid" +start_stop_daemon_args="--user logstash" +command_args="${LS_OPTS}" + +start_pre() { + checkpath --owner logstash:daemon --directory ${pidfile%/*} +} + +start() { + ebegin "Starting logstash" + start-stop-daemon $start_stop_daemon_args --background --start --exec \ + $command --make-pidfile --pidfile $pidfile -- $command_args + eend $? +} + +# uses the openrc templates for start()/stop() |