This patch repairs init script for Snort. Current version can start snort, but
cannot stop it.
Signed-off-by: Jiri Slachta <slachta@cesnet.cz>
SVN-Revision: 33798
PKG_NAME:=snort
PKG_VERSION:=2.9.2.2
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://snort.org/dl/snort-current/
# Copyright (C) 2012 OpenWrt.org
START=99
-APP=snort
+APP=snort.bin
BIN_FILE="/usr/bin/"$APP
PID_FILE="/var/run/"$APP"_"$INTERFACE".pid"
-OPTIONS=
+OPTIONS="--daq-dir /usr/lib/daq/"
DEFAULT=/etc/default/snort
LOG_D=/var/log/snort
start() {
[ -d $LOG_D ] || mkdir -p $LOG_D
- start-stop-daemon -S -x $BIN_FILE -p $PID_FILE -b -m -- $OPTIONS
+ start-stop-daemon -S -x $APP -p $PID_FILE -b -m -- $OPTIONS
}
stop() {
- start-stop-daemon -K -x $BIN_FILE -p $PID_FILE -q
+ start-stop-daemon -K -x $APP -p $PID_FILE -s TERM
rm -rf $PID_FILE
}