Line 0
Link Here
|
|
|
1 |
#!/bin/sh |
2 |
|
3 |
# $FreeBSD$ |
4 |
# |
5 |
# PROVIDE: statsite |
6 |
# REQUIRE: LOGIN |
7 |
# KEYWORD: shutdown |
8 |
# |
9 |
# Add these lines to /etc/rc.conf.local or /etc/rc.conf |
10 |
# to enable this service: |
11 |
# |
12 |
# statsite_enable (bool): Set to NO by default. |
13 |
# Set it to YES to enable doormand. |
14 |
# statsite_config (path): Set to %%PREFIX%%/etc/statsite.conf |
15 |
# by default. |
16 |
|
17 |
. /etc/rc.subr |
18 |
|
19 |
name=statsite |
20 |
rcvar=statsite_enable |
21 |
|
22 |
load_rc_config $name |
23 |
|
24 |
: ${statsite_enable:="NO"} |
25 |
: ${statsite_config="%%PREFIX%%/etc/statsite.conf"} |
26 |
|
27 |
pidfile=/var/run/${name}.pid |
28 |
command="/usr/sbin/daemon" |
29 |
|
30 |
command_args="-u statsd -P ${pidfile} /usr/local/bin/statsite" |
31 |
|
32 |
run_rc_command "$1" |