Release notes: https://github.com/fluent/fluentd/releases/tag/v1.19.0 Actively ignore upstream hack to avoid performance problems with Windows as discussed in https://github.com/fluent/fluentd/issues/5041. FreeBSD ports framework has no easy way to force old versions of rubygems, and it seems that in this case it is also not relevant.
47 lines
1.1 KiB
Bash
47 lines
1.1 KiB
Bash
#!/bin/sh
|
|
|
|
# PROVIDE: fluentd
|
|
# REQUIRE: LOGIN
|
|
# KEYWORD: shutdown
|
|
#
|
|
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
|
|
# to enable this service:
|
|
#
|
|
# fluentd_enable (bool): Set to NO by default.
|
|
# Set it to YES to enable fluentd.
|
|
# fluentd_config (path): Set to %%PREFIX%%/etc/fluentd/fluent.conf
|
|
# by default.
|
|
# fluentd_flags (str): Set to "" by default.
|
|
|
|
. /etc/rc.subr
|
|
|
|
name=fluentd
|
|
rcvar=fluentd_enable
|
|
extra_commands="init"
|
|
|
|
load_rc_config $name
|
|
|
|
: ${fluentd_enable:="NO"}
|
|
: ${fluentd_config="%%PREFIX%%/etc/fluentd/fluent.conf"}
|
|
: ${fluentd_dir="%%PREFIX%%/etc/fluentd"}
|
|
: ${fluentd_user="%%USER%%"}
|
|
: ${fluentd_group="%%GROUP%%"}
|
|
: ${fluentd_flags:=""}
|
|
: ${fluentd_env:="FLUENT_CONF_INCLUDE_DIR=${fluentd_dir}/conf.d"}
|
|
|
|
start_precmd="fluentd_start_precmd"
|
|
|
|
command=%%PREFIX%%/bin/${name}
|
|
pidfile=/var/run/${name}/${name}.pid
|
|
command_interpreter=%%RUBY%%
|
|
|
|
command_args="-d $pidfile -c $fluentd_config"
|
|
|
|
fluentd_start_precmd()
|
|
{
|
|
install -d -o ${fluentd_user} -g ${fluentd_group} -m 775 ${fluentd_dir}
|
|
install -d -o ${fluentd_user} -g ${fluentd_group} -m 775 /var/run/fluentd
|
|
}
|
|
|
|
run_rc_command "$1"
|