From: Alex Suykov Date: Sat, 23 May 2015 10:05:13 +0000 (+0300) Subject: mongoose: systemd support X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=de2dd8f473d5502c61e162594a6a6c3273270a9a;p=buildroot.git mongoose: systemd support [Thomas: use relative symbolic link.] Signed-off-by: Alex Suykov Signed-off-by: Thomas Petazzoni --- diff --git a/package/mongoose/mongoose.mk b/package/mongoose/mongoose.mk index 6797e58857..14f2aae152 100644 --- a/package/mongoose/mongoose.mk +++ b/package/mongoose/mongoose.mk @@ -36,6 +36,14 @@ define MONGOOSE_INSTALL_INIT_SYSV $(TARGET_DIR)/etc/init.d/S85mongoose endef +define MONGOOSE_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/mongoose/mongoose.service \ + $(TARGET_DIR)/usr/lib/systemd/system/mongoose.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -sf ../../../../usr/lib/systemd/system/mongoose.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/mongoose.service +endef + define MONGOOSE_INSTALL_STAGING_CMDS $(INSTALL) -D -m 644 $(@D)/libmongoose.a \ $(STAGING_DIR)/usr/lib/libmongoose.a diff --git a/package/mongoose/mongoose.service b/package/mongoose/mongoose.service new file mode 100644 index 0000000000..12a731c832 --- /dev/null +++ b/package/mongoose/mongoose.service @@ -0,0 +1,10 @@ +[Unit] +Description=Mongoose HTTP server +After=network.target + +[Service] +ExecStart=/usr/sbin/mongoose -document_root /var/www -listening_port 80 +Restart=always + +[Install] +WantedBy=multi-user.target