summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2015-05-23 15:28:56 +0000
committerJohn Crispin <john@openwrt.org>2015-05-23 15:28:56 +0000
commita2d0d58a8ebe43fa532b7da1f22f34465970b35d (patch)
treeb6d41533c5dfc84e5c9a5cfeac7ccb24702f9149 /package
parent9a96820d3d7fc96a79277f0d7f78851bd6092ef1 (diff)
downloadmtk-20170518-a2d0d58a8ebe43fa532b7da1f22f34465970b35d.zip
mtk-20170518-a2d0d58a8ebe43fa532b7da1f22f34465970b35d.tar.gz
mtk-20170518-a2d0d58a8ebe43fa532b7da1f22f34465970b35d.tar.bz2
conntrack-tools: add init script for conntrackd
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> SVN-Revision: 45737
Diffstat (limited to 'package')
-rw-r--r--package/network/utils/conntrack-tools/Makefile2
-rw-r--r--package/network/utils/conntrack-tools/files/conntrackd.init17
2 files changed, 19 insertions, 0 deletions
diff --git a/package/network/utils/conntrack-tools/Makefile b/package/network/utils/conntrack-tools/Makefile
index 2c479c0..978467b 100644
--- a/package/network/utils/conntrack-tools/Makefile
+++ b/package/network/utils/conntrack-tools/Makefile
@@ -63,6 +63,8 @@ define Package/conntrack-tools/install
$(PKG_INSTALL_DIR)/usr/sbin/conntrack \
$(PKG_INSTALL_DIR)/usr/sbin/conntrackd \
$(1)/usr/sbin/
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/conntrackd.init $(1)/etc/init.d/conntrackd
endef
$(eval $(call BuildPackage,conntrack-tools))
diff --git a/package/network/utils/conntrack-tools/files/conntrackd.init b/package/network/utils/conntrack-tools/files/conntrackd.init
new file mode 100644
index 0000000..a51eb88
--- /dev/null
+++ b/package/network/utils/conntrack-tools/files/conntrackd.init
@@ -0,0 +1,17 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2015 OpenWrt.org
+
+START=21
+STOP=89
+
+USE_PROCD=1
+PROG="/usr/sbin/conntrackd"
+
+start_service() {
+ procd_open_instance
+
+ procd_set_param command $PROG -C /etc/conntrackd/conntrackd.conf
+ procd_set_param respawn
+
+ procd_close_instance
+}