From b39faff8c5d425fe5f9fa64baf4b9ceb77b432f0 Mon Sep 17 00:00:00 2001 From: Alex Suykov Date: Sat, 23 May 2015 13:06:09 +0300 Subject: [PATCH] olsr: systemd support [Thomas: use relative symlink instead of absolute symlink] Signed-off-by: Alex Suykov Signed-off-by: Thomas Petazzoni --- package/olsr/olsr.mk | 8 ++++++++ package/olsr/olsr.service | 10 ++++++++++ 2 files changed, 18 insertions(+) create mode 100644 package/olsr/olsr.service 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 -- 2.30.2