ddns-scripts: add init script
authorJo-Philipp Wich <jow@openwrt.org>
Tue, 15 Oct 2013 13:37:34 +0000 (13:37 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Tue, 15 Oct 2013 13:37:34 +0000 (13:37 +0000)
Signed-off-by: Bruno Randolf <br1@einfach.org>
SVN-Revision: 38416

net/ddns-scripts/Makefile
net/ddns-scripts/files/etc/init.d/ddns [new file with mode: 0644]

index 651c623592868d4dbe84bff25c1c28df5c7d6abb..0e9f0f3dc77c60abc70cdf3b87d9732043051fd3 100644 (file)
@@ -37,6 +37,8 @@ endef
 define Package/ddns-scripts/install
        $(INSTALL_DIR) $(1)
        $(CP) ./files/* $(1)/
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/etc/init.d/ddns $(1)/etc/init.d/
 endef
 
 $(eval $(call BuildPackage,ddns-scripts))
diff --git a/net/ddns-scripts/files/etc/init.d/ddns b/net/ddns-scripts/files/etc/init.d/ddns
new file mode 100644 (file)
index 0000000..3171d5a
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh /etc/rc.common
+START=95
+
+start() {
+       . /usr/lib/ddns/dynamic_dns_functions.sh
+       start_daemon_for_all_ddns_sections
+}
+
+stop() {
+       killall -9 dynamic_dns_updater.sh
+}
+