-
-
Save thomasbhatia/bf3f025254331e5b24c663e318cf3010 to your computer and use it in GitHub Desktop.
Mosquitto MQTT Broker systemd start up script
This file contains hidden or 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/local/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf -d" | |
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