14 Commits
Author SHA1 Message Date
Joachim Zobel 15b238241a Mosquitto now waits for network-online when starting (Closes: #1036450)
See: https://github.com/eclipse/mosquitto/issues/2878
2025-08-08 00:02:05 +01:00
Guillaume Champagne f529623b38 Let systemd create directories
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>
2025-07-11 15:00:23 +01:00
Gaël PORTAY 4237144427 Add systemd watchdog support
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>
2025-02-25 11:51:24 +00:00
Roger A. Light 71a90177d7 Systemd: Add mosquitto group ownership
Thanks to minfrin
2022-07-20 17:03:42 +01:00
Roger Light be78a26fe8 Fix pid paths in systemd unit. 2021-04-26 21:55:37 +01:00
Peter Stevenson 8a44e5940c Systemd service changes for updated pid path.
Signed-off-by: Peter Stevenson <pete@ihut.co.uk>
2020-12-17 00:24:10 +00:00
Roger A. Light 5a56f066a8 Change systemd unit files to create /var/log/mosquitto
This happens before starting the broker.

Also don't quit with an error if opening the log file isn't possible.

Closes #821.
2020-07-14 20:10:54 +01:00
Stavros Vagionitis 2488d6acf1 mosquitto.service: mosquitto starts even if the network is offline
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>
2020-03-12 12:37:39 +00:00
Roger A. Light e4db8707a6 Add ExecReload stanza to systemd units files.
This is as per systemd documentation.
2019-03-26 22:43:01 +00:00
Rich Mattes 79baa4968d Add documentation and networking dep to unit files
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>
2018-08-09 12:11:59 +01:00
Tomas Novotny fe93138197 Add default config path to systemd services. (#139)
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>
2016-04-19 22:38:44 +01:00
Tomas Novotny 29731b5e46 [471053] Add systemd support and services.
Add possibility to notify systemd that service is fully started. Also add
reference service files.

Change-Id: Ib4e39c8406ab6c15e1b88f197ae8f91c3e402023
Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=471053
Signed-off-by: Tomas Novotny <novotny@rehivetech.com>
2015-06-26 10:29:39 +02:00
Roger A. Light ac377b7bd1 Match upstart prefix to default config.mk. 2014-09-21 21:57:53 +01:00
Roger Light 0364bd1be7 Initial contribution. 2014-05-07 23:27:00 +01:00