I am trying to run a Mosquitto MQTT Broker on Ubuntu 16.04. I have instructions from 14.04, but since 16.04 no longer uses startup, I can't figure out how to convert to systemd.
Here are the commands for 14.04:
description "Mosquitto MQTT broker" start on net-device-up respawn exec /usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf
This is what I got to so far. When I reboot and run
systemctl status mosquitto.service I show that mosquitto is loaded but not active:
[Unit] Description=Mosquitto MQTT Broker [Service] WorkingDirectory=/usr/sbin/mosquitto ExecStart=/etc/mosquitto/mosquitto.conf Restart=always [Install] WantedBy=multi-user.target
sudo systemctl enable mosquitto.service. Now the error exit code is:
Process: 1720 ExecStart=/etc/mosquitto/mosquitto.conf (code=exited, status=200/CHDIR)