Created
October 19, 2018 18:33
-
-
Save CosminLazar/b19773a15d1ead3c141d51e2abe76aaf to your computer and use it in GitHub Desktop.
Systemd service for Mosquitto
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=Mosquitto MQTT Broker daemon | |
ConditionPathExists=/etc/mosquitto/mosquitto.conf | |
After=network.target | |
Requires=network.target | |
[Service] | |
Type=forking | |
RemainAfterExit=no | |
StartLimitInterval=0 | |
PIDFile=/var/run/mosquitto.pid | |
ExecStart=/bin/sh -c "/usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf -d -v" | |
ExecReload=/bin/kill -HUP $MAINPID | |
Restart=on-failure | |
RestartSec=2 | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment