|
From: Heiko Z. <smi...@us...> - 2006-08-18 15:38:38
|
Update of /cvsroot/devil-linux/build/scripts/scripts In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv24001/scripts/scripts Modified Files: Tag: rel-1-2-patches snort Log Message: - added siproxd 0.5.14 (Heiko / Roland Pabel) - added support for pidfiles in /etc/init.d/functions for reloadproc, killproc and statusproc (Heiko / Roland Pabel) - introduced a build configuration option to enable magic sysrq in the kernel (Heiko / Roland Pabel) Index: snort =================================================================== RCS file: /cvsroot/devil-linux/build/scripts/scripts/snort,v retrieving revision 1.7.2.1 retrieving revision 1.7.2.2 diff -u -d -r1.7.2.1 -r1.7.2.2 --- snort 25 Jul 2005 17:15:51 -0000 1.7.2.1 +++ snort 18 Aug 2006 15:38:35 -0000 1.7.2.2 @@ -44,27 +44,43 @@ exit 1 fi +ONLY_INTERFACE=$2 + case "$1" in start) mkdir -p /var/log/snort for IF in $SNORT_INTERFACES do + test -n "$ONLY_INTERFACE" -a "$ONLY_INTERFACE" != "$IF" && continue echo -n "Starting $NAME on $IF: " $DAEMON $PARAMETER -i $IF -c /etc/snort/snort-$IF.conf evaluate_retval done ;; stop) - echo -n "Shutting down $NAME: " - killproc $DAEMON + if [ -n "$ONLY_INTERFACE" ]; then + echo -n "Shutting down $NAME on $ONLY_INTERFACE: " + killproc -p /var/run/snort_${ONLY_INTERFACE}.pid $DAEMON + else + echo -n "Shutting down $NAME: " + killproc $DAEMON + fi ;; restart) - $0 stop + shift + $0 stop $@ sleep 1 - $0 start + $0 start $@ ;; + status) + if [ -n "$ONLY_INTERFACE" ]; then + statusproc -p /var/run/snort_${ONLY_INTERFACE}.pid $DAEMON + else + statusproc $DAEMON + fi + ;; *) - echo "Usage: $0 {start|stop|restart}" + echo "Usage: $0 {start|stop|restart|status}" exit 1 ;; esac |