Last active
February 17, 2021 05:10
-
-
Save kwilczynski/6c6645dfdc8de4cd9ed1 to your computer and use it in GitHub Desktop.
kafka.service for systemd
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
[Unit] | |
Description=Apache Kafka server (broker) | |
Documentation=http://kafka.apache.org/documentation.html | |
Requires=network.target remote-fs.target syslog.target | |
After=network.target remote-fs.target syslog.target | |
ConditionPathExists=/etc/kafka/server.properties | |
ConditionPathExists=/var/lib/kafka | |
[Service] | |
Type=simple | |
PIDFile=/var/run/kafka.pid | |
User=kafka | |
Group=kafka | |
WorkingDirectory=/var/lib/kafka | |
EnvironmentFile=/etc/sysconfig/kafka | |
ExecStart= | |
ExecStop= | |
Restart=on-failure | |
SyslogIdentifier=kafka | |
[Install] | |
WantedBy=multi-user.target |
@vide why you can't leverage EnvironmentFile? It should expose anything you put there to ExecStart for you to use.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@kwilczynski what do you use as "ExecStart"? I'm using right know the java + classpath + java options and kinda works but I can't leverage EnvironmentFile this way (I'm on Debian and using /etc/default/kafka as EnvironmentFile)