#!/bin/sh # # $FreeBSD: head/net-mgmt/icinga-core/files/ido2db.in 372771 2014-11-19 12:34:49Z lme $ # # PROVIDE: ido2db # REQUIRE: 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. # ido2db_configfile (str): Set to "%%PREFIX%%/etc/icinga/ido2db.cfg" by default. . /etc/rc.subr name="ido2db" rcvar=ido2db_enable load_rc_config "${name}" : ${ido2db_enable:="NO"} : ${ido2db_configfile="%%PREFIX%%/etc/icinga/ido2db.cfg"} command="%%PREFIX%%/bin/${name}" command_args="-c" start_cmd="start_cmd" required_files="${ido2db_configfile}" command_args="${command_args} ${ido2db_configfile}" start_cmd() { ${command} ${command_args} } run_rc_command "$1"