Created
July 1, 2019 01:27
-
-
Save islands04/f12ec9d94bb024f1730f1102db4af477 to your computer and use it in GitHub Desktop.
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=MQTT v3.1 message broker | |
After=network.target | |
Requires=network.target | |
[Service] | |
Type=simple | |
ExecStart=/usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf | |
Restart=always | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using systemd start up for Mosquitto:
Mosquitto broker does not use systemd for start up. In order to remove the old init system, follow the procedure below:
sudo systemctl stop mosquitto
sudo update-rc.d mosquitto remove
sudo rm /etc/init.d/mosquitto
After removing the init.d script for Mosquitto broker, Create the systemd unit file
sudo vim /etc/systemd/system/mosquitto.service