[Snort-users] snort script

paul.johnson8 at ...11827... paul.johnson8 at ...11827...
Tue Aug 15 02:35:38 EDT 2006


I have a script for Solaris which is used to stopping and starting
snort.  Unfortuantly, the script keeps coming up with a syntax errror.
 Could some kind person shed some light on this.

Thanks for your help.

#!/sbin/sh
SnortBin=/usr/local/bin
ConfDir=/usr/local/snort/etc
RuleDir=/usr/local/snort/rules
case "$1" in
'start')
        [ -f $ConfDir/snort.conf ] && $SnortBin/snort -u snort -g
snort -d -D -i eri0 -c $ConfDir/snort.conf
    echo "snort starting."
        ;;

'stop')
        kill `cat /var/run/snort_eri0.pid`
    echo "snort stopping."
        ;;

*)
        echo "Usage: $0 { start | stop }"
        exit 1)
esac
exit 0




More information about the Snort-users mailing list