Manually creating directories conflicts with systemd service hardening
features. Particularly, `ProtectSystem=strict` mounts the filesystem as
read-only for the processes started by the unit which leads to `mkdir`
failing.
By setting `User=mosquitto` and adding `RuntimeDirectory` and
`LogsDirectory`, systemd creates `/run/mosquitto` and
`/var/log/mosquitto` with the right permissions even
`ProtectSystem=strict` is used.
Signed-off-by: Guillaume Champagne <champagne.guillaume.c@gmail.com>
Add possibility to send keep-alive ping to systemd watchdog. Also update
notify service file to ping service manager every 3 minutes; mosquitto
pings actually every 1 minute and 30 seconds (half period).
Signed-off-by: Gaël PORTAY <gael.portay@rtone.fr>
This patch changes the behavior of how mosquitto is starting using
systemd.
Currently it is starting only when the network is online, meaning that the
network is configured to a routable IP address.
With this patch, mosquitto is starting when the network is offline, does
not need to be configured. This is needed because the MQTT broker might
be used as an internal message bus which does not need the network to be
online.
Signed-off-by: Stavros Vagionitis <stavros.vagionitis@jci.com>
Updated the unit file examples to add a dependency on the
network-online.target systemd target to prevent mosquitto from
starting without network connectivity.
Added a documentation line to the unit files pointing to mosquitto
manpages.
Signed-off-by: Rich Mattes <richmattes@gmail.com>
Config file is installed by default, so I would expect that it will be used by
the systemd service. Add argument for the configuration to the services.
Signed-off-by: Tomas Novotny <novotny@rehivetech.com>