diff options
author | Gabe Evans <gabe@hashrabbit.co> | 2015-10-31 21:27:17 +0000 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2015-11-02 21:34:22 +0100 |
commit | 3e7f636c2cbc7483888fef1a032e98bdeb463fe9 (patch) | |
tree | 35cf4e1657c75929a310b4b6848724bc98e93ac9 | |
parent | 774c599fc568a5a12feff0b633f29f7ca38814ca (diff) | |
download | buildroot-3e7f636c2cbc7483888fef1a032e98bdeb463fe9.tar.gz buildroot-3e7f636c2cbc7483888fef1a032e98bdeb463fe9.zip |
mosquitto: systemd support
Signed-off-by: Gabe Evans <gabe@hashrabbit.co>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-rw-r--r-- | package/mosquitto/mosquitto.mk | 8 | ||||
-rw-r--r-- | package/mosquitto/mosquitto.service | 10 |
2 files changed, 18 insertions, 0 deletions
diff --git a/package/mosquitto/mosquitto.mk b/package/mosquitto/mosquitto.mk index 73365f9e02..efeb32d2ee 100644 --- a/package/mosquitto/mosquitto.mk +++ b/package/mosquitto/mosquitto.mk @@ -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 diff --git a/package/mosquitto/mosquitto.service b/package/mosquitto/mosquitto.service new file mode 100644 index 0000000000..2d1939d1c7 --- /dev/null +++ b/package/mosquitto/mosquitto.service @@ -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 |