aboutsummaryrefslogtreecommitdiffstats
path: root/testing/logstash/logstash.initd
blob: e7e8ed7a2c13496e4d3c49ad1e408dd8fc5d43ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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()