#!/bin/sh # # $FreeBSD$ # # PROVIDE: rrdbot # REQUIRE: LOGIN # KEYWORD: shutdown # # Add the following line to /etc/rc.conf to enable rrdbot: # rrdbot_enable (bool): Set to "NO" by default. # Set it to "YES" to start rrdbotd. # rrdbot_pidfile (str): pidfile location for rrdbotd. # Defaults to "/var/run/rrdbotd.pid". # rrdbot_flags (str): Custom command-line flags to be passed # to rrdbotd (default: none). # . %%RC_SUBR%% name="rrdbot" rcvar=`set_rcvar` load_rc_config $name : ${rrdbot_enable="NO"} : ${rrdbot_pidfile="/var/run/rrdbotd.pid"} : ${rrdbot_flags=""} pidfile="${rrdbot_pidfile}" command="%%PREFIX%%/sbin/rrdbotd" command_args="-p ${rrdbot_pidfile} ${rrdbot_flags}" run_rc_command "$1"