Created
February 10, 2014 15:05
-
-
Save vanjos/8917495 to your computer and use it in GitHub Desktop.
Upstart script for Kafka
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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