2012-08-13 14:08:40 +00:00
|
|
|
#!/bin/sh /etc/rc.common
|
|
|
|
# Copyright (C) 2012 OpenWrt.org
|
2006-11-13 08:15:26 +00:00
|
|
|
|
2012-08-13 14:08:40 +00:00
|
|
|
START=99
|
2012-10-16 15:55:49 +00:00
|
|
|
APP=snort.bin
|
2012-08-13 14:08:40 +00:00
|
|
|
BIN_FILE="/usr/bin/"$APP
|
|
|
|
PID_FILE="/var/run/"$APP"_"$INTERFACE".pid"
|
2012-10-16 15:55:49 +00:00
|
|
|
OPTIONS="--daq-dir /usr/lib/daq/"
|
2006-11-13 08:15:26 +00:00
|
|
|
DEFAULT=/etc/default/snort
|
|
|
|
LOG_D=/var/log/snort
|
|
|
|
|
2012-08-13 14:08:40 +00:00
|
|
|
start() {
|
|
|
|
[ -d $LOG_D ] || mkdir -p $LOG_D
|
2012-10-16 15:55:49 +00:00
|
|
|
start-stop-daemon -S -x $APP -p $PID_FILE -b -m -- $OPTIONS
|
2012-08-13 14:08:40 +00:00
|
|
|
}
|
2006-11-13 08:15:26 +00:00
|
|
|
|
2012-08-13 14:08:40 +00:00
|
|
|
stop() {
|
2012-10-16 15:55:49 +00:00
|
|
|
start-stop-daemon -K -x $APP -p $PID_FILE -s TERM
|
2012-08-13 14:08:40 +00:00
|
|
|
rm -rf $PID_FILE
|
|
|
|
}
|