packages/net/snort/files/snort.init
florian 8c54687eb5 [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
2012-10-16 15:55:49 +00:00

21 lines
422 B
Bash

#!/bin/sh /etc/rc.common
# Copyright (C) 2012 OpenWrt.org
START=99
APP=snort.bin
BIN_FILE="/usr/bin/"$APP
PID_FILE="/var/run/"$APP"_"$INTERFACE".pid"
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 $APP -p $PID_FILE -b -m -- $OPTIONS
}
stop() {
start-stop-daemon -K -x $APP -p $PID_FILE -s TERM
rm -rf $PID_FILE
}