blob: b594ac7dc6635bdb4827c89e320668eba0126cb9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
#!/sbin/runscript
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/portsentry/files/portsentry.rc6,v 1.2 2003/02/14 22:57:56 vapier Exp $
# NB: Config is in /etc/conf.d/portsentry
depend() {
need net
}
checkconfig() {
if [ ! -e /etc/portsentry/portsentry.conf ] ; then
eerror "You need an /etc/portsentry/portsentry.conf file"
eerror "There is a sample in /usr/share/doc/portsentry"
return 1
fi
if [ -z "$PORTSENTRY_MODES" ] ; then
eerror "You need to setup your PORTSENTRY_MODES first"
eerror "Check /etc/conf.d/portsentry that you've enabled some or all of them"
return 1
fi
}
start() {
checkconfig || return 1
ebegin "Starting portsentry"
for mode in $PORTSENTRY_MODES ; do
/usr/bin/portsentry -$mode
result=$(( $result + $? ))
done
eend $result
}
stop() {
ebegin "Stopping portsentry"
killall portsentry
eend $?
}
|