aboutsummaryrefslogtreecommitdiff
path: root/sysutils/fluent-bit/files/fluent-bit.in
blob: 85ae67e7aee6267e969a4ad8de50b9fd6f87c197 (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: fluent-bit
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: shutdown

# Add the following lines to /etc/rc.conf to enable fluent-bit:
#
# fluent_bit_enable (bool):	Set to YES to enable fluent-bit
# 				Default: NO
# fluent_bit_config (str):	config files to use
#				Default: %%ETCDIR%%/fluent-bit.conf
# fluent_bit_flags (str):	Extra flags passed to fluent-bit
# fluent_bit_user (str):        Default run as user nobody

. /etc/rc.subr

name="fluent_bit"
rcvar=${name}_enable
load_rc_config $name

: ${fluent_bit_enable:="NO"}
: ${fluent_bit_user:="nobody"}

command=%%PREFIX%%/bin/fluent-bit
command_args="--quiet --daemon --config %%ETCDIR%%/fluent-bit.conf"

run_rc_command "$1"