aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/rrdbot/files/rrdbot.in
blob: 8c7b18d3d55e97e132aeb8447e46562642e21bf9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/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).
#

. /etc/rc.subr

name="rrdbot"
rcvar=rrdbot_enable

load_rc_config $name

: ${rrdbot_enable="NO"}
: ${rrdbot_pidfile="/var/run/rrdbotd.pid"}

pidfile="${rrdbot_pidfile}"

command="%%PREFIX%%/sbin/rrdbotd"
command_args="-p ${rrdbot_pidfile}"

run_rc_command "$1"