description "Kafka Broker"

# This file is managed by Chef
# Changes will be overwritten

start on runlevel [2345]
stop on starting rc RUNLEVEL=[016]

respawn
respawn limit 2 5

umask 007

kill timeout 300

pre-start script
    [ -r /etc/default/kafka ]
end script

limit nofile 32768 32768

script
  [ -e "/etc/default/kafka" ] && . "/etc/default/kafka"
  echo "  exec start-stop-daemon --start --chuid ${KAFKA_USER} --name ${KAFKA_USER} --exec ${KAFKA_SERVER_START} -- ${SERVER_PROPERTIES}" > /tmp/out
  exec start-stop-daemon --start --chuid ${KAFKA_USER} --name ${KAFKA_USER} \
    --exec ${KAFKA_BIN}/kafka-server-start.sh -- ${KAFKA_CONFIG}/server.properties
end script

