updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / snort-sam / snort
blob9a3a1e7dc0c7255300c8f55e888b12d5b6517920
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
6 # source application-specific settings
7 SNORT_ARGS=
8 [ -f /etc/conf.d/snort ] && . /etc/conf.d/snort
10 PID=`pidof -o %PPID /usr/bin/snort`
11 case "$1" in
12 start)
13 stat_busy "Starting Intrusion Database System: SNORT"
14 [ -z "$PID" ] && /usr/bin/snort ${SNORT_ARGS}
15 if [ $? -gt 0 ]; then
16 stat_fail
17 else
18 add_daemon snort
19 stat_done
23 stop)
24 stat_busy "Stopping Intrusion Database System: SNORT"
25 [ ! -z "$PID" ] && kill $PID &> /dev/null
26 if [ $? -gt 0 ]; then
27 stat_fail
28 else
29 rm_daemon snort
30 stat_done
33 restart)
34 $0 stop
35 sleep 1
36 $0 start
39 echo "usage: $0 {start|stop|restart}"
40 esac
41 exit 0