aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/statsite/files/statsite.in
blob: c180efb453410130e615d35c502881b93c7426d2 (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
#!/bin/sh

# PROVIDE: statsite
# REQUIRE: NETWORKING SYSLOG
# KEYWORD: shutdown
#
# Add these lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# statsite_enable (bool):	Set to NO by default.
#				Set it to YES to enable statsite.
# statsite_config (path):	Set to %%PREFIX%%/etc/statsite.conf
#				by default.

. /etc/rc.subr

name=statsite
rcvar=statsite_enable

load_rc_config $name

: ${statsite_enable:="NO"}
: ${statsite_config="%%PREFIX%%/etc/statsite.conf"}

pidfile=/var/run/${name}.pid
command="/usr/sbin/daemon"
command_args="-f -u statsd -P ${pidfile} %%PREFIX%%/bin/statsite -f ${statsite_config}"

run_rc_command "$1"