summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--package/olsr/olsr.mk8
-rw-r--r--package/olsr/olsr.service10
2 files changed, 18 insertions, 0 deletions
diff --git a/package/olsr/olsr.mk b/package/olsr/olsr.mk
index 7e28b1e411..0dec8dc002 100644
--- a/package/olsr/olsr.mk
+++ b/package/olsr/olsr.mk
@@ -40,4 +40,12 @@ define OLSR_INSTALL_INIT_SYSV
$(TARGET_DIR)/etc/init.d/S50olsr
endef
+define OLSR_INSTALL_INIT_SYSTEMD
+ $(INSTALL) -D -m 644 package/olsr/olsr.service \
+ $(TARGET_DIR)/usr/lib/systemd/system/olsr.service
+ mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
+ ln -sf ../../../../usr/lib/systemd/system/olsr.service \
+ $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/olsr.service
+endef
+
$(eval $(generic-package))
diff --git a/package/olsr/olsr.service b/package/olsr/olsr.service
new file mode 100644
index 0000000000..9ec8930352
--- /dev/null
+++ b/package/olsr/olsr.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Ad-hoc wireless mesh routing daemon
+After=network.target
+
+[Service]
+ExecStart=/usr/sbin/olsrd -nofork
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
OpenPOWER on IntegriCloud