summaryrefslogtreecommitdiffstats
path: root/openwrt/package/snort-wireless/ipkg/snort-wireless.init
diff options
context:
space:
mode:
authornico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-11-06 16:06:51 +0000
committernico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-11-06 16:06:51 +0000
commit1a7c5d7335884e86eac17257266bfb582983cf83 (patch)
treed8a1ec1170db9fe6628736fdca51bb881a98016d /openwrt/package/snort-wireless/ipkg/snort-wireless.init
parent7e66ceed5875cde01380aabc158305baa84dddf9 (diff)
add snort-wireless package (thanks to Florian Fainelli)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@2354 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'openwrt/package/snort-wireless/ipkg/snort-wireless.init')
-rw-r--r--openwrt/package/snort-wireless/ipkg/snort-wireless.init23
1 files changed, 23 insertions, 0 deletions
diff --git a/openwrt/package/snort-wireless/ipkg/snort-wireless.init b/openwrt/package/snort-wireless/ipkg/snort-wireless.init
new file mode 100644
index 000000000..8c019c41d
--- /dev/null
+++ b/openwrt/package/snort-wireless/ipkg/snort-wireless.init
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+DEFAULT=/etc/default/snort
+LOG_D=/var/log/snort
+RUN_D=/var/run
+[ -f $DEFAULT ] && . $DEFAULT
+PID_F=$RUN_D/snort_$INTERFACE.pid
+
+case $1 in
+ start)
+ [ -d $LOG_D ] || mkdir -p $LOG_D
+ [ -d $RUN_D ] || mkdir -p $RUN_D
+ snort $OPTIONS
+ ;;
+ stop)
+ [ -f $PID_F ] && kill $(cat $PID_F)
+ ;;
+ *)
+ echo "usage: $0 (start|stop)"
+ exit 1
+esac
+
+exit $?