diff options
Diffstat (limited to 'net-analyzer/snort/files/snort.rc6')
-rw-r--r-- | net-analyzer/snort/files/snort.rc6 | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/net-analyzer/snort/files/snort.rc6 b/net-analyzer/snort/files/snort.rc6 index 4cd0f7c580eb..4c09ae325d4f 100644 --- a/net-analyzer/snort/files/snort.rc6 +++ b/net-analyzer/snort/files/snort.rc6 @@ -1,13 +1,22 @@ #!/sbin/runscript -# Copyright 1999-2002 Gentoo Technologies, Inc. -# Distributed under the terms of the GNU General Public License, v2 or later -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/snort/files/snort.rc6,v 1.1 2002/06/28 11:54:12 bangert Exp $ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/snort/files/snort.rc6,v 1.1.1.1 2005/11/30 10:12:24 chriswhite Exp $ depend() { need net } +checkconfig() { + if [ ! -e /etc/snort/snort.conf ] ; then + eerror "You need an /etc/snort/snort.conf to run snort" + eerror "There is an example config in /etc/snort/snort.conf.distrib" + return 1 + fi +} + start() { + checkconfig || return 1 ebegin "Starting snort" start-stop-daemon --start --quiet --exec /usr/bin/snort \ -- ${SNORT_OPTS} >/dev/null 2>&1 |