You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/net-analyzer/portmon/files/portmon.init

30 lines
633 B

#!/sbin/openrc-run
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# 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
}