Snort mailing list archives

RE: anyone got a good snort startup script?


From: "Everist, Benjamin S. (NASWI)" <EveristB () naswi navy mil>
Date: Fri, 11 Jul 2003 13:55:21 -0700

In FreeBSD, put your script in /usr/local/etc/rc.d/whatever.sh and give it
execute permissions.  On boot and shutdown, FreeBSD will call the script
with a start or a stop argument depending.  So I use the following:

#cat /usr/local/etc/rc.d/local.sh

#!/bin/sh

case "$1" in
        start)
                cd /usr/local/mysql && ./bin/safe_mysqld & \
                > /dev/null && echo -n ' started mysqld '
                sleep 3
                if [ -x /usr/local/bin/snort ]; then
                /usr/local/bin/snort -D -i xl0 -u snort -g snort -c \
                /usr/local/snort-2.0.0/etc/snort.conf \
                > /dev/null && echo -n ' -*> Snort! <*-' && echo ""
                fi
                ;;
        stop)
                /usr/bin/killall snort
                /usr/bin/killall mysqld
                ;;
        *)
                echo ""
                echo "Usage: `basename $0` {start|stop}"
                echo ""
                ;;
esac

HTH,

Benjamin
-----Original Message-----
From: Bryan Irvine [mailto:bryan.irvine () kingcountyjournal com]
Sent: Friday, July 11, 2003 1:40 PM
To: Scott Renna
Cc: Snort-users () lists sourceforge net
Subject: Re: [Snort-users] anyone got a good snort startup script?


You could fairly easily make your own rc-style script if you wanted. 
The pid's are kept in /var/run.  So to kill you might use something like

kill `cat /var/run/snort*`





On Fri, 2003-07-11 at 13:02, Scott Renna wrote:
hello,

I was trying to find the PID so that I could make a snort startup
script, but I can't find where it's written to.  Anyone written a decent
one?  I'm using FreeBSD 4.8 Stable.

Scott

***************************
Scott Renna
Head Systems Administrator
Dynamic Animation Systems
703-503-0500

*************************** 



-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps1
_______________________________________________
Snort-users mailing list
Snort-users () lists sourceforge net
Go to this URL to change user options or unsubscribe:
https://lists.sourceforge.net/lists/listinfo/snort-users
Snort-users list archive:
http://www.geocrawler.com/redir-sf.php3?list=snort-users




-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps1
_______________________________________________
Snort-users mailing list
Snort-users () lists sourceforge net
Go to this URL to change user options or unsubscribe:
https://lists.sourceforge.net/lists/listinfo/snort-users
Snort-users list archive:
http://www.geocrawler.com/redir-sf.php3?list=snort-users

Current thread: