| Server IP : 82.208.35.60 / Your IP : 216.73.216.89 Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31 System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64 User : studiokobylisy_cz ( 1008) PHP Version : 7.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/ports/sysutils/beats7/files/ |
Upload File : |
#!/bin/sh
# PROVIDE: packetbeat
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: shutdown
# Add the following lines to /etc/rc.conf to enable packetbeat
#
# packetbeat_enable (bool): Set to YES to enable packetbeat
# Default: NO
# packetbeat_flags (str): Extra flags passed to packetbeat
# packetbeat_config (str): packetbeat configuration directory
# Default: ${PREFIX}/etc/beats
# packetbeat_conffile (str): packetbeat configuration file
# relative to ${packetbeat_conf}
# Default: packetbeat.yml
. /etc/rc.subr
name="packetbeat"
rcvar=${name}_enable
load_rc_config $name
: ${packetbeat_enable:="NO"}
: ${packetbeat_config:="%%ETCDIR%%"}
: ${packetbeat_conffile:="packetbeat.yml"}
: ${packetbeat_home:="%%DATADIR%%/packetbeat"}
: ${packetbeat_logs:="/var/log/beats"}
: ${packetbeat_data:="/var/db/beats/packetbeat"}
# daemon
start_precmd=packetbeat_prestart
command=/usr/sbin/daemon
pidfile="/var/run/${name}"
command_args="-frP ${pidfile} %%PREFIX%%/sbin/${name} ${packetbeat_flags} --path.config ${packetbeat_config} --path.home ${packetbeat_home} --path.data ${packetbeat_data} --path.logs ${packetbeat_logs} -c ${packetbeat_conffile}"
packetbeat_prestart() {
# Have to empty rc_flags so they don't get passed to daemon(8)
rc_flags=""
}
run_rc_command "$1"