diff options
author | Alex Suykov <alex.suykov@gmail.com> | 2015-05-23 13:08:37 +0300 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2015-07-14 14:03:03 +0200 |
commit | b7afea9500de01a9b41c32045de6ec72c209d59e (patch) | |
tree | 68f28235adb8b5bbdac39118714862a350b04040 /package/tinyhttpd | |
parent | de2dd8f473d5502c61e162594a6a6c3273270a9a (diff) |
tinyhttpd: systemd support
[Thomas: use relative symlink.]
Signed-off-by: Alex Suykov <alex.suykov@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/tinyhttpd')
-rw-r--r-- | package/tinyhttpd/tinyhttpd.mk | 8 | ||||
-rw-r--r-- | package/tinyhttpd/tinyhttpd.service | 10 |
2 files changed, 18 insertions, 0 deletions
diff --git a/package/tinyhttpd/tinyhttpd.mk b/package/tinyhttpd/tinyhttpd.mk index 0934b7103..194249bd1 100644 --- a/package/tinyhttpd/tinyhttpd.mk +++ b/package/tinyhttpd/tinyhttpd.mk @@ -24,4 +24,12 @@ define TINYHTTPD_INSTALL_INIT_SYSV $(TARGET_DIR)/etc/init.d/S85tinyhttpd endef +define TINYHTTPD_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/tinyhttpd/tinyhttpd.service \ + $(TARGET_DIR)/usr/lib/systemd/system/tinyhttpd.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -sf ../../../../usr/lib/systemd/system/tinyhttpd.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/tinyhttpd.service +endef + $(eval $(generic-package)) diff --git a/package/tinyhttpd/tinyhttpd.service b/package/tinyhttpd/tinyhttpd.service new file mode 100644 index 000000000..0ae5bac94 --- /dev/null +++ b/package/tinyhttpd/tinyhttpd.service @@ -0,0 +1,10 @@ +[Unit] +Description=Tiny HTTP daemon +After=network.target + +[Service] +ExecStart=/usr/sbin/tinyhttpd +Restart=always + +[Install] +WantedBy=multi-user.target |