diff options
author | Daniel Ahlberg <aliz@gentoo.org> | 2002-07-26 08:34:36 +0000 |
---|---|---|
committer | Daniel Ahlberg <aliz@gentoo.org> | 2002-07-26 08:34:36 +0000 |
commit | e7dea1528b973bdb69609d4eda4462faa565ef50 (patch) | |
tree | c3291cf4d969bdd038374ff474772eb52385c684 /net-analyzer/snort | |
parent | Closes bug #5592 (diff) | |
download | gentoo-2-e7dea1528b973bdb69609d4eda4462faa565ef50.tar.gz gentoo-2-e7dea1528b973bdb69609d4eda4462faa565ef50.tar.bz2 gentoo-2-e7dea1528b973bdb69609d4eda4462faa565ef50.zip |
Checking for configfiles at startup
Diffstat (limited to 'net-analyzer/snort')
-rw-r--r-- | net-analyzer/snort/files/snort.rc6 | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/net-analyzer/snort/files/snort.rc6 b/net-analyzer/snort/files/snort.rc6 index 4cd0f7c580eb..17be6cde746e 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 $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/snort/files/snort.rc6,v 1.2 2002/07/26 08:34:36 aliz 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 |