[Snort-users] snort script

Nigel Houghton nigel at ...1935...
Tue Aug 15 09:46:58 EDT 2006


On  0, "paul.johnson8 at ...11827..." <paul.johnson8 at ...11827...> wrote:
> 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 }"

You don't say what the error is, but I'm guessing it's here:

>         exit 1)

Which should look like this:

          exit 1
          ;;

> esac
> exit 0

+--------------------------------------------------------------------+
     Nigel Houghton      Research Engineer       Sourcefire Inc.
                   Vulnerability Research Team

         There is no theory of evolution, just a list
            of creatures Vin Diesel allows to live.




More information about the Snort-users mailing list