summaryrefslogtreecommitdiff
path: root/net-misc/kafka-bin/files/kafka.init.d.2
blob: 87b4b47a446989e2139d4c8f6e252f0d64c2e9f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/sbin/openrc-run
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

description="Kafka distributed messaging system"

logfile="/var/log/kafka/kafka.log"

command="/opt/kafka/bin/kafka-server-start.sh"
command_args="/etc/kafka/server.properties"

command_background=yes
pidfile=/run/kafka.pid

start() {
	start-stop-daemon --start --background --user kafka --chdir /opt/kafka --stdout $logfile --stderr $logfile \
	--env KAFKA_HEAP_OPTS="${KAFKA_HEAP_OPTS}" \
	--pidfile $pidfile --exec /opt/kafka/bin/kafka-server-start.sh -- /etc/kafka/server.properties
}
depend() {
       after zookeeper kafka-zookeeper
}