systemctl注册kafka-eagle为自启动服务

/ Linux / 没有评论 / 160浏览

vim /usr/lib/systemd/system/kafka-eagle.service

[Unit]
Description=kafka-eagle

[Service]
User=root
Group=root

Type=forking
ExecStart=/opt/kafka-eagle/bin/ke.sh start
ExecReload=/opt/kafka-eagle/bin/ke.sh restart
ExecStop=/opt/kafka-eagle/bin/ke.sh stop
Restart=always
RestartSec=5
StartLimitInterval=0

[Install]
WantedBy=multi-user.target

systemctl daemon-reload

systemctl enable kafka-eagle.service

systemctl start kafka-eagle.service