summaryrefslogtreecommitdiff
path: root/openwrt/package/peerguardian/files
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2005-12-18 15:24:18 +0000
committerFlorian Fainelli <florian@openwrt.org>2005-12-18 15:24:18 +0000
commitebc6a1895a967120863be457d265c50c6e2f11a6 (patch)
tree5ba63c94f6fa87b990ba5ee011a90cbe2f15df04 /openwrt/package/peerguardian/files
parent3426c752f67f3233e0594a753d1c7fc9ca7bb6e2 (diff)
downloadmtk-20170518-ebc6a1895a967120863be457d265c50c6e2f11a6.zip
mtk-20170518-ebc6a1895a967120863be457d265c50c6e2f11a6.tar.gz
mtk-20170518-ebc6a1895a967120863be457d265c50c6e2f11a6.tar.bz2
Added peerguardian
SVN-Revision: 2724
Diffstat (limited to 'openwrt/package/peerguardian/files')
-rw-r--r--openwrt/package/peerguardian/files/peerguardian.init21
1 files changed, 21 insertions, 0 deletions
diff --git a/openwrt/package/peerguardian/files/peerguardian.init b/openwrt/package/peerguardian/files/peerguardian.init
new file mode 100644
index 0000000..5807314
--- /dev/null
+++ b/openwrt/package/peerguardian/files/peerguardian.init
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+BIN=pgtext
+DEFAULT=/etc/default/$BIN
+[ -f $DEFAULT ] && . $DEFAULT
+RUN_D=/var/run
+PID_F=$RUN_D/$BIN_${IF}_${ID}.pid
+
+case $1 in
+ start)
+ $BIN $OPTIONS
+ ;;
+ stop)
+ [ -f $PID_F ] && kill $(cat $PID_F) >/dev/null 2>&1
+ ;;
+ *)
+ echo "usage: $0 (start|stop)"
+ exit 1
+esac
+
+exit $?