[package] snort: init script enhancements
This patch repairs init script for Snort. Current version can start snort, but cannot stop it. Signed-off-by: Jiri Slachta <slachta@cesnet.cz> git-svn-id: svn://svn.openwrt.org/openwrt/packages@33798 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
1185fa326e
commit
8c54687eb5
@ -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/
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user