diff options
author | Florian Fainelli <florian@openwrt.org> | 2005-12-18 15:24:18 +0000 |
---|---|---|
committer | Florian Fainelli <florian@openwrt.org> | 2005-12-18 15:24:18 +0000 |
commit | ebc6a1895a967120863be457d265c50c6e2f11a6 (patch) | |
tree | 5ba63c94f6fa87b990ba5ee011a90cbe2f15df04 /openwrt/package/peerguardian/files | |
parent | 3426c752f67f3233e0594a753d1c7fc9ca7bb6e2 (diff) | |
download | mtk-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.init | 21 |
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 $? |