Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Upstart script for Kafka
description "Kafka Broker"
start on runlevel [2345]
stop on starting rc RUNLEVEL=[016]
respawn
respawn limit 2 5
env CONFIG_HOME="/etc/kafka"
env KAFKA_HOME="/usr/lib/kafka"
umask 007
kill timeout 300
pre-start script
[ -r "${CONFIG_HOME}/server.properties" ]
end script
limit nofile 32768 32768
script
KAFKA_ENABLED="no"
[ -e "/etc/default/kafka" ] && . "/etc/default/kafka"
if [ "x$KAFKA_ENABLED" = "xyes" ]; then
exec start-stop-daemon --start --chuid kafka --name kafka \
--exec ${KAFKA_HOME}/bin/kafka-server-start.sh -- ${CONFIG_HOME}/server.properties
fi
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment