mosquitto: systemd support
PATCH 1/1 mosquitto: systemd support
Signed-off-by Gabe Evans <[email protected]>
--- package/mosquitto/mosquitto.mk | 8 ++++++++ package/mosquitto/mosquitto.service | 10 ++++++++++ 2 files changed, 18 insertions(+) create mode 100644 package/mosquitto/mosquitto.service
package/mosquitto/mosquitto.mk +8 -0
@@ -83,6 +83,14 @@ define MOSQUITTO_INSTALL_INIT_SYSV $(TARGET_DIR)/etc/init.d/S50mosquitto endef +define MOSQUITTO_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/mosquitto/mosquitto.service \ + $(TARGET_DIR)/usr/lib/systemd/system/mosquitto.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -fs ../../../../usr/lib/systemd/system/mosquitto.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/mosquitto.service +endef + define MOSQUITTO_USERS mosquitto -1 nogroup -1 * - - - Mosquitto user endef
package/mosquitto/mosquitto.service new file +10 -0
@@ -0,0 +1,10 @@ +[Unit] +Description=Mosquitto MQTT broker + +[Service] +ExecStart=/usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf +ExecReload=/bin/kill -HUP $MAINPID +Restart=always + +[Install] +WantedBy=multi-user.target
Signature · 1 line
1.9.1
PATCH 1/1 mosquitto: systemd support
Dear Gabe Evans,
Quoted 6 lines · Gabe Evans
Signed-off-by Gabe Evans <[email protected]>--- package/mosquitto/mosquitto.mk | 8 ++++++++ package/mosquitto/mosquitto.service | 10 ++++++++++ 2 files changed, 18 insertions(+) create mode 100644 package/mosquitto/mosquitto.service
I don't fully understand the systemd thing, but this looked reasonable, so I've applied. Systemd people in the Buildroot community are invited to comment/review a bit more on systemd related things :)
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com