1 #!/bin/sh 2 # 3 # $NetBSD: ipmon,v 1.7 2002/04/17 11:05:12 darrenr Exp $ 4 # 5 6 # PROVIDE: ipmon 7 # REQUIRE: syslogd 8 # BEFORE: SERVERS 9 10 . /etc/rc.subr 11 12 name="ipmon" 13 rcvar=$name 14 command="/usr/sbin/${name}" 15 if [ "${IPMON_DAEMON}" = "Y" ] ; then 16 IPMON_ARGS="-D ${IPMON_ARGS}" 17 fi 18 if [ "${IPMON_PIDFILE}" != "" ] ; then 19 IPMON_ARGS="-p ${IPMON_PIDFILE} ${IPMON_ARGS}" 20 fi 21 if [ "${IPMON_LOG_ALL}" = "Y" ] ; then 22 IPMON_ARGS="-a ${IPMON_ARGS}" 23 fi 24 if [ "${IPMON_LOG_BODY}" = "Y" ] ; then 25 IPMON_ARGS="-b ${IPMON_ARGS}" 26 fi 27 if [ "${IPMON_RESOLVE_NAMES}" = "Y" ] ; then 28 IPMON_ARGS="-n ${IPMON_ARGS}" 29 fi 30 31 command_args="${IPMON_ARGS} ${IPMON_LOG_OUTPUT}" 32 33 load_rc_config $name 34 run_rc_command "$1" 35