NetBSD/etc/rc.d/ipmon
2002-04-17 11:05:12 +00:00

35 lines
677 B
Bash
Executable File

#!/bin/sh
#
# $NetBSD: ipmon,v 1.7 2002/04/17 11:05:12 darrenr Exp $
#
# PROVIDE: ipmon
# REQUIRE: syslogd
# BEFORE: SERVERS
. /etc/rc.subr
name="ipmon"
rcvar=$name
command="/usr/sbin/${name}"
if [ "${IPMON_DAEMON}" = "Y" ] ; then
IPMON_ARGS="-D ${IPMON_ARGS}"
fi
if [ "${IPMON_PIDFILE}" != "" ] ; then
IPMON_ARGS="-p ${IPMON_PIDFILE} ${IPMON_ARGS}"
fi
if [ "${IPMON_LOG_ALL}" = "Y" ] ; then
IPMON_ARGS="-a ${IPMON_ARGS}"
fi
if [ "${IPMON_LOG_BODY}" = "Y" ] ; then
IPMON_ARGS="-b ${IPMON_ARGS}"
fi
if [ "${IPMON_RESOLVE_NAMES}" = "Y" ] ; then
IPMON_ARGS="-n ${IPMON_ARGS}"
fi
command_args="${IPMON_ARGS} ${IPMON_LOG_OUTPUT}"
load_rc_config $name
run_rc_command "$1"