blob: 08d4832b50566f4d8e02ee554161f2f50c186d85 (
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
36
37
38
39
40
41
42
43
44
45
46
|
#!/bin/sh
# $FreeBSD$
#
# PROVIDE: mcollectived
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# mcollectived_enable (bool): Set to NO by default.
# Set it to YES to enable mcollectived.
# mcollectived_flags (str): Set as needed. Empty by default.
. /etc/rc.subr
name="mcollectived"
rcvar=mcollectived_enable
load_rc_config "${name}"
: ${mcollectived_enable="NO"}
pidfile="/var/run/${name}.pid"
command="%%PREFIX%%/sbin/${name}"
command_args="-p $pidfile"
command_interpreter=%%RUBY%%
PATH="${PATH}:/usr/local/bin"
# An UTF-8 locale is required
: LC_ALL=${LC_ALL:=C.UTF-8}
case $LC_ALL in
*.UTF-8)
;;
*.*)
LC_ALL="${LC_ALL%.*}.UTF-8"
;;
*)
LC_ALL=C.UTF-8
;;
esac
export LC_ALL
run_rc_command "$1"
|