title: upstart script for kafka
body: <p>I am using upstart script to do start kafka and zookeeper. My steps are:
  (1)The following is kafka-zk.conf (Put it in /etc/init/):</p>
  
  <pre><code>kill timeout 300
  
  start on runlevel [2345]
  stop on runlevel [06]
  
  pre-start script
  end script
  
  script
      KAFKA_HOME=/home/My/kafka/kafka_&lt;version&gt;
      exec $KAFKA_HOME/bin/zookeeper-server-start.sh $KAFKA_HOME/config/zookeeper.properties
  end script
  </code></pre>
  
  <p>(2) Create symbol link: ln -s /lib/init/upstart-job /etc/init.d/kafka-zk</p>
  
  <p>(3) Run "sudo service kafka-zk start|stop" to start or stop kafka and zookeeper</p>
  
  <p>My question is: when running "sudo service kafka-zk stop", I am not sure whether the script <strong>zookeeper-server-stop.sh</strong> (<a href="http://kafka.apache.org/documentation.html#quickstart" rel="nofollow">http://kafka.apache.org/documentation.html#quickstart</a>) was called or not. How to make the upstart script to use <strong>zookeeper-server-stop.sh</strong>?</p>
  
  <p>Also, should I use exec $KAFKA_HOME/bin/zookeeper-server-start.sh <strong>-daemon</strong> $KAFKA_HOME/config/zookeeper.properties? </p>