mosquitto: install default mosquitto.conf for systemd compatibility

The upgrade to mosquitto 2.1.2 follows an upstream change where the
default configuration file is only installed as
${sysconfdir}/mosquitto/mosquitto.conf.example.

However, the shipped systemd service explicitly starts mosquitto using
${sysconfdir}/mosquitto/mosquitto.conf. If this file is not present, the
daemon exits immediately and the service fails to start.

Install the default mosquitto.conf alongside the example file, using the
upstream-provided configuration, to match the expectations of the
service unit and ensure the service starts correctly by default, as done
with the 2.0.22 version.

Signed-off-by: Ricardo Salveti <ricardo.salveti@oss.qualcomm.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
This commit is contained in:
Ricardo Salveti
2026-04-14 22:53:38 -03:00
committed by Khem Raj
parent 6b29351885
commit ea3df4e2c6

View File

@@ -57,6 +57,8 @@ do_install:append() {
-e 's,@LOCALSTATEDIR@,${localstatedir},g' \
-e 's,@SYSCONFDIR@,${sysconfdir},g' \
${D}${sysconfdir}/init.d/mosquitto
install -m 0644 ${S}/mosquitto.conf ${D}${sysconfdir}/mosquitto/mosquitto.conf
}
PACKAGE_BEFORE_PN = "libmosquitto1 libmosquittopp1 ${PN}-clients ${PN}-examples"