pthsem: moved to github
[openwrt.org/packages.git] / net / snort.init
1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2012 OpenWrt.org
3
4 START=99
5 APP=snort.bin
6 BIN_FILE="/usr/bin/"$APP
7 PID_FILE="/var/run/"$APP"_"$INTERFACE".pid"
8 OPTIONS="--daq-dir /usr/lib/daq/"
9 DEFAULT=/etc/default/snort
10 LOG_D=/var/log/snort
11
12 start() {
13 [ -d $LOG_D ] || mkdir -p $LOG_D
14 start-stop-daemon -S -x $APP -p $PID_FILE -b -m -- $OPTIONS
15 }
16
17 stop() {
18 start-stop-daemon -K -x $APP -p $PID_FILE -s TERM
19 rm -rf $PID_FILE
20 }
21
comments