--- Makefile.org 2012-01-28 16:36:46.000000000 +0000 +++ Makefile 2012-01-28 17:51:38.000000000 +0000 @@ -27,6 +27,7 @@ NANOSLEEP "Use nanosleep in event timing" off \ EVENT_BROKER "Enable event broker functionality" off \ UNHANDLED_HACK "Display passive checks in unhandled queries" off \ + IDOUTILS "Enable IDOUtils [required MySQL]" off \ GNU_CONFIGURE= yes @@ -108,6 +109,14 @@ CONFIGURE_ARGS+= --disable-event-broker .endif +.if defined(WITH_IDOUTILS) +USE_MYSQL= yes +LIB_DEPENDS+= dbi.1:${PORTSDIR}/databases/libdbi-drivers +CONFIGURE_ARGS+= --enable-idoutils +INSTALL_TARGET+= install-idoutils +USE_RC_SUBR+= ido2db +.endif + post-patch: .if defined(WITH_UNHANDLED_HACK) @${REINPLACE_CMD} -e 's#;serviceprops=42\&#;serviceprops=10\&#g' \ --- /dev/null 2012-01-28 18:00:51.000000000 +0000 +++ files/ido2db.in 2012-01-28 18:00:30.000000000 +0000 @@ -0,0 +1,33 @@ +#!/bin/sh +# +# $FreeBSD: ports/net-mgmt/ido2db/files/ido2db.in,v 1.0 2012/01/28 17:35:01 gdelmatto Exp $ +# + +# PROVIDE: ido2db +# REQUIRE: DAEMON +# BEFORE: LOGIN +# KEYWORD: shutdown + +# +# Add the following lines to /etc/rc.conf to enable ido2db: +# ido2db_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable ido2db. +# + +. /etc/rc.subr + +name="ido2db" +rcvar=`set_rcvar` + +command="%%PREFIX%%/bin/ido2db" +command_args="-c" + +[ -z "${ido2db_enable}" ] && ido2db_enable="NO" +[ -z "${ido2db_configfile}" ] && ido2db_configfile="%%PREFIX%%/etc/icinga/ido2db.cfg" + +load_rc_config "${name}" + +required_files="${ido2db_configfile}" +command_args="${command_args} ${ido2db_configfile}" + +run_rc_command "$1" --- files/pkg-message.in.org 2012-01-28 17:48:37.000000000 +0000 +++ files/pkg-message.in 2012-01-28 17:49:38.000000000 +0000 @@ -4,6 +4,10 @@ icinga_enable="YES" + If installed, enable ido2db in /etc/rc.conf with the following line: + + ido2db_enable="YES" + Configuration templates are available in %%PREFIX%%/etc/icinga as *.cfg-sample files. Copy them to *.cfg files where required and edit to suit your needs. Documentation is available in HTML form