Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Mar 2003 09:15:02 GMT
From:      Yonatan@xpert.com
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/49047: rc.d script for security/snort
Message-ID:  <200303090915.h299F2400344@node-110.xpert.com>

next in thread | raw e-mail | index | archive | help

>Number:         49047
>Category:       ports
>Synopsis:       rc.d script for security/snort
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 09 01:20:09 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Yonatan@xpert.com
>Release:        FreeBSD 4.8-RC i386
>Organization:
>Environment:
System: FreeBSD Temujin 4.8-RC FreeBSD 4.8-RC #3: Wed Mar 5 14:10:08 GMT 2003 root@Temujin:/usr/obj/usr/src/sys/TEMUJIN i386


>Description:
	This is a sample script for ${PREFIX}/etc/rc.d that will wake snort up on boot, and take it down on shutdown. Nothing fancy here.
	This is needed, because I'm planning on teaching ACID many new things, and ACID expects snort to help itself.
	There is only one thing that requires thinking here: This should run only after {MySQL|PostgreSQL} server is up, as snort might want to report to the local server.

>How-To-Repeat:
	N/A
>Fix:

--- snort.sh.sample.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	snort.sh.sample
#
echo x - snort.sh.sample
sed 's/^X//' >snort.sh.sample << 'END-of-snort.sh.sample'
X#!/bin/sh
X
Xif ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
X    echo "$0: Cannot determine the PREFIX" >&2
X    exit 1
Xfi
X
Xcase "$1" in
Xstart)
X    ${PREFIX}/bin/snort -Dqc ${PREFIX}/etc/snort.conf > /dev/null && echo " snort"
X    ;;
Xstop)
X    kill `cat /var/run/snort_*.pid`
X    ;;
Xrestart)
X    killall -1 `cat /var/run/snort_*.pid`
X    ;;
X*)
X    echo "Usage: snort.sh [start|stop|restart]"
X    ;;
Xesac
END-of-snort.sh.sample
exit
--- snort.sh.sample.shar ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200303090915.h299F2400344>