inadyn: systemd support
authorAlex Suykov <alex.suykov@gmail.com>
Sat, 23 May 2015 10:03:45 +0000 (13:03 +0300)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 13 Jul 2015 17:16:26 +0000 (19:16 +0200)
Signed-off-by: Alex Suykov <alex.suykov@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/inadyn/inadyn.mk
package/inadyn/inadyn.service [new file with mode: 0644]

index b002f94e8ddd45faeb778f8accdf37ec7748e32a..5c3b0e3b55f36d9c34f0e5aacf2891181494fd33 100644 (file)
@@ -30,4 +30,12 @@ define INADYN_INSTALL_INIT_SYSV
                $(TARGET_DIR)/etc/init.d/S70inadyn
 endef
 
+define INADYN_INSTALL_INIT_SYSTEMD
+       $(INSTALL) -D -m 644 package/inadyn/inadyn.service \
+               $(TARGET_DIR)/usr/lib/systemd/system/inadyn.service
+       mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
+       ln -sf /usr/lib/systemd/system/inadyn.service \
+               $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/inadyn.service
+endef
+
 $(eval $(autotools-package))
diff --git a/package/inadyn/inadyn.service b/package/inadyn/inadyn.service
new file mode 100644 (file)
index 0000000..abc0a1e
--- /dev/null
@@ -0,0 +1,10 @@
+[Unit]
+Description=DDNS client
+After=syslog.target network.target
+
+[Service]
+ExecStart=/usr/bin/inadyn
+Restart=always
+
+[Install]
+WantedBy=multi-user.target