diff options
author | David Spencer <baildon.research@googlemail.com> | 2015-02-22 16:53:35 +0000 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2015-02-28 11:38:41 +0700 |
commit | 1343d1b305e8b282c34fd6dfc7fea0fb83f452c0 (patch) | |
tree | f14420f90629bdc952666b53ed17e885c90e458a /network/snort/rc.snort | |
parent | f8fcf19788f89279e4f05ce033960851a8516bf0 (diff) | |
download | slackbuilds-1343d1b305e8b282c34fd6dfc7fea0fb83f452c0.tar.gz |
network/snort: Updated for version 2.9.7.0.
Signed-off-by: David Spencer <baildon.research@googlemail.com>
Diffstat (limited to 'network/snort/rc.snort')
-rw-r--r-- | network/snort/rc.snort | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/network/snort/rc.snort b/network/snort/rc.snort index 9aaf410fcf..228e8da4e3 100644 --- a/network/snort/rc.snort +++ b/network/snort/rc.snort @@ -1,7 +1,7 @@ #!/bin/sh # Start/stop/restart snort -# This tell snort which interface to listen on (any for every interface) +# This tell snort which interface to listen on ("any" == every interface) IFACE=${IFACE:-any} # Make sure this matches your IFACE @@ -23,18 +23,22 @@ snort_start() { # Stop snort: snort_stop() { - echo -n "Stopping Snort daemon ($IFACE)..." - kill $(cat $PIDFILE) - echo - sleep 1 - rm -f $PIDFILE + if [ -f "$PIDFILE" ]; then + echo -n "Stopping Snort daemon (interface $IFACE)..." + kill $(cat $PIDFILE) + echo + sleep 1 + rm -f $PIDFILE + else + echo "Pidfile $PIDFILE not found!" + echo "Either Snort is not running or you should specify IFACE=xxxx" + exit 1 + fi } # Restart snort: snort_restart() { - snort_stop - sleep 1 - snort_start + snort_stop && sleep 1 && snort_start } case "$1" in |