From: Mike Williams Date: Fri, 20 Mar 2015 19:14:11 +0000 (-0400) Subject: thttpd: add systemd service file X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c85b3fca39e9a3361a3202037010211566d152fd;p=buildroot.git thttpd: add systemd service file Based on Arch service file, adjusted to point to /usr/sbin. Signed-off-by: Mike Williams Signed-off-by: Thomas Petazzoni --- diff --git a/package/thttpd/thttpd.mk b/package/thttpd/thttpd.mk index 1a028c8737..5b4b0c4591 100644 --- a/package/thttpd/thttpd.mk +++ b/package/thttpd/thttpd.mk @@ -44,4 +44,12 @@ define THTTPD_INSTALL_INIT_SYSV $(SED) 's:/usr/local/sbin:/usr/sbin:g' $(TARGET_DIR)/etc/init.d/S90thttpd endef +define THTTPD_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 0644 package/thttpd/thttpd.service \ + $(TARGET_DIR)/usr/lib/systemd/system/thttpd.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/ + ln -fs ../../../../usr/lib/systemd/system/thttpd.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/thttpd.service +endef + $(eval $(autotools-package)) diff --git a/package/thttpd/thttpd.service b/package/thttpd/thttpd.service new file mode 100644 index 0000000000..e3c93e7b3c --- /dev/null +++ b/package/thttpd/thttpd.service @@ -0,0 +1,10 @@ +[Unit] +Description=Tiny HTTP Daemon + +[Service] +PIDFile=/run/thttpd.pid +ExecStart=/usr/sbin/thttpd -D -C /etc/thttpd.conf +Restart=always + +[Install] +WantedBy=multi-user.target