Snort mailing list archives

Re: process check


From: Joel Esler <joel.esler () sourcefire com>
Date: Fri, 14 Oct 2005 10:00:45 -0400

See if this works for ya...

Of course you'll have to change the START_CMD line to read however you have your command line options..


<---start--->
#!/bin/sh

START_CMD='/usr/local/bin/snort -c /snort/snort-2.4.2/rules/ snort.conf -D'

PROC=`ps aux | grep "snort -c" | grep -v grep`
        if [ -z "${PROC}" ]; then
                for i in 1; do
                        ${START_CMD} && exit
                done
        fi
<----end--->

There are probably better ways to do this, but it's first thing in the morning over here (PST)

Joel Esler


On Oct 14, 2005, at 9:44 AM, Rod G wrote:

Hello,

Could someone please point me to a shell or perl script that will
detect whether or not Snort is running and start it if it isn't
running?

Thanks,
Rod

----------------------------
http://www.elkland.net


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
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 is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
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: