snort: init script enhancements
authorFlorian Fainelli <florian@openwrt.org>
Tue, 16 Oct 2012 15:55:49 +0000 (15:55 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Tue, 16 Oct 2012 15:55:49 +0000 (15:55 +0000)
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

net/snort/Makefile
net/snort/files/snort.init

index eb16cccb93b71b0a737bb7d8cac53cea2f223808..514e5996820769a7ad6b6e73a1f7099f3d9dd62d 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 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/
index 820ef11c1ac3455564a55e7e1e57c8e9f4ad65a4..3dd0eac323ce8227b0d24deb79cc53f2ebd7690e 100644 (file)
@@ -2,19 +2,19 @@
 # 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
 }