@@ -153,6 +153,7 @@
do
mkdir -p "$LOGDIR/$i"
chown -R $USER:$GROUP $LOGDIR
+ SNORT_SOCKET=/var/run/snort_${i}.pid
/sbin/startproc -p $SNORT_SOCKET $SNORT_BIN $ALERTMODE $BINARY_LOG $NO_PACKET_LOG $DUMP_APP -D $PRINT_INTERFACE -i $i -u $USER -g $GROUP $CONF -l $LOGDIR/$i $PASS_FIRST $BPFFILE $BPF > /dev/null 2>&1
# Remember status and be verbose
rc_status -v
@@ -167,20 +168,26 @@
;;
stop)
echo -n "Shutting down snort "
- /sbin/killproc $SNORT_BIN > /dev/null 2>&1
- chown -R $USER:$GROUP /var/run/snort_${INTERFACE_CONF}.* &&
- rm -f /var/run/snort_${INTERFACE_CONF}.pi*
- rc_status -v
+ for i in `echo $INTERFACE | sed s/"-i "//` ; do
+ SNORT_SOCKET=/var/run/snort_${i}.pid
+ /sbin/killproc -p ${SNORT_SOCKET} $SNORT_BIN > /dev/null 2>&1
+ chown -R $USER:$GROUP /var/run/snort_${i}.* &&
+ rm -f /var/run/snort_${i}.pi*
+ rc_status -v
+ done
;;
restart)
$0 stop
echo -n "starting snort - moment please "
i=60
- while [ -e $SNORT_SOCKET ] && [ $i -gt 0 ]; do
- sleep 1
- i=$[$i-1]
- echo -n "."
- done
+ for i in `echo $INTERFACE | sed s/"-i "//` ; do
+ SNORT_SOCKET=/var/run/snort_${i}.pid
+ while [ -e $SNORT_SOCKET ] && [ $i -gt 0 ]; do
+ sleep 1
+ i=$[$i-1]
+ echo -n "."
+ done
+ done
echo "."
$0 start
;;
|