summaryrefslogtreecommitdiff
blob: 9a2a5e410bbf812122cfc82323cb51aada6d91f4 (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
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/portmon/files/portmon.init,v 1.2 2004/03/04 19:02:51 vapier Exp $

# configuration is done in /etc/pormon.sh

depend() {
   need net
}

checkconfig() {
	if [ ! -e /etc/portmon/portmon.hosts ]; then
		error " You need /etc/portmon/portmaon.hosts to run portmon."
		return 1
	fi
}

start() {
	checkconfig || return 1
	ebegin "Starting portmon"
	start-stop-daemon --start --quiet --exec /usr/sbin/portmon -- -d -c /etc/portmon/portmon.hosts
	eend $?
}

stop() {
	checkconfig || return 1
	ebegin "Staring portmon"
	start-stop-daemon --stopt --quiet --exec /usr/sbin/portmon 
}