Skip to content

Instantly share code, notes, and snippets.

@daimaou92
Last active August 29, 2019 10:30
Show Gist options
  • Save daimaou92/654cf845965fc92b9fd4f8f3e3b065dd to your computer and use it in GitHub Desktop.
Save daimaou92/654cf845965fc92b9fd4f8f3e3b065dd to your computer and use it in GitHub Desktop.
[Unit]
Description=Kafka
Requires=zookeeper.service
After=zookeeper.service
[Service]
Type=simple
ExecStart=/bin/sh -c '/home/ubuntu/.kafka/bin/kafka-server-start.sh /home/ubuntu/.kafka/config/server.properties > /home/ubuntu/.kafka/kafka.log 2>&1'
ExecStop=/home/ubuntu/.kafka/bin/kafka-server-stop.sh
Restart=on-abnormal
[Install]
WantedBy=multi-user.target
[Unit]
Description=Zookeeper
After=syslog.target
After=network.target
After=systemd-vconsole-setup.service
[Service]
Type=simple
ExecStart=/home/ubuntu/.kafka/bin/zookeeper-server-start.sh /home/ubuntu/.kafka/config/zookeeper.properties
ExecStop=/home/ubuntu/.kafka/bin/zookeeper-server-stop.sh
Restart=on-abnormal
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment