[Thomas: use relative symlink instead of absolute symlink]
Signed-off-by: Alex Suykov <alex.suykov@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
$(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))
--- /dev/null
+[Unit]
+Description=Ad-hoc wireless mesh routing daemon
+After=network.target
+
+[Service]
+ExecStart=/usr/sbin/olsrd -nofork
+Restart=always
+
+[Install]
+WantedBy=multi-user.target