Add basic init script for portsentry #2962
authorFlorian Fainelli <florian@openwrt.org>
Fri, 4 Jan 2008 02:38:44 +0000 (02:38 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Fri, 4 Jan 2008 02:38:44 +0000 (02:38 +0000)
SVN-Revision: 10103

net/portsentry/Makefile
net/portsentry/files/portsentry.init [new file with mode: 0644]

index d02a9ff4807d1c5318484fdfbad8876f463f58a9..bbd6830e1bb4a94999f7d94ea5231487e570601e 100644 (file)
@@ -35,8 +35,9 @@ MAKE_FLAGS += \
        linux \
 
 define Package/portsentry/install      
-       $(INSTALL_DIR) $(1)/etc
+       $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_NAME).conf $(1)/etc/
+       $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/bin/
 endef
diff --git a/net/portsentry/files/portsentry.init b/net/portsentry/files/portsentry.init
new file mode 100644 (file)
index 0000000..dbaa362
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2007 OpenWrt.org
+START=99
+
+start() {
+       portsentry -atcp
+       portsentry -audp
+}
+
+stop() {
+       killall -9 portsentry
+}
+