The three elasticsearch beats ports have merged into one single port systuils/beats that installs all of the above and some more. The reason is to make the port more maintainable and also that the new heartbeat beat would conflict with sysutils/heartbeat. Add heartbeat beat. Install utilities share/beats/import_dashboards share/beats/migrate_beat_config_1_x_to_5_0.py Fix problems with the default configurations [1] PR: 217081 [1]
37 lines
861 B
Bash
37 lines
861 B
Bash
#!/bin/sh
|
|
# $FreeBSD$
|
|
|
|
# PROVIDE: filebeat
|
|
# REQUIRE: DAEMON
|
|
# BEFORE: LOGIN
|
|
# KEYWORD: shutdown
|
|
|
|
# Add the following lines to /etc/rc.conf to enable filebeat:
|
|
#
|
|
# filebeat_enable (bool): Set to YES to enable filebeat
|
|
# Default: NO
|
|
# filebeat_flags (str): Extra flags passed to filebeat
|
|
# filebeat_conf (str): filebeat configuration file
|
|
# Default: ${PREFIX}/etc/filebeat.yml
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="filebeat"
|
|
rcvar=${name}_enable
|
|
load_rc_config $name
|
|
|
|
: ${filebeat_enable:="NO"}
|
|
: ${filebeat_config:="-path.home /var/db/beats/${name} -path.config %%PREFIX%%/etc"}
|
|
|
|
# daemon
|
|
start_precmd=filebeat_prestart
|
|
command=/usr/sbin/daemon
|
|
pidfile="/var/run/${name}"
|
|
command_args="-rP ${pidfile} %%PREFIX%%/sbin/${name} ${filebeat_config}"
|
|
|
|
filebeat_prestart() {
|
|
# Have to empty rc_flags so they don't get passed to daemon(8)
|
|
rc_flags=""
|
|
}
|
|
|
|
run_rc_command "$1"
|