ports/sysutils/osquery/files/osqueryd.in
Ryan Steinmetz 6efaeef862 New port: sysutils/osquery:
osquery exposes an operating system as a high-performance relational database.
This allows you to write SQL-based queries to explore operating system data.
With osquery, SQL tables represent abstract concepts such as running
processes, loaded kernel modules, open network connections, browser plugins,
hardware events or file hashes.

WWW: https://osquery.io/

Sponsored by:	Beer from wxs@
2015-05-10 15:19:11 +00:00

41 lines
869 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: osqueryd
# REQUIRE: %%REQUIRE%%
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable osqueryd:
#
# osqueryd_enable="YES"
#
. /etc/rc.subr
name=osqueryd
rcvar=osqueryd_enable
load_rc_config $name
command=%%PREFIX%%/sbin/osqueryd
osqueryd_enable=${osqueryd_enable-"NO"}
osqueryd_flags=${osqueryd_flags-""}
osqueryd_config=${osqueryd_config-"%%PREFIX%%/etc/osquery.conf"}
required_files=${osqueryd_config}
command_args="--pidfile /var/run/osqueryd.pid --disable_watchdog --daemonize=true --config_path=${osqueryd_config}"
extra_commands="configtest"
configtest_cmd="configtest"
pidfile="/var/run/osqueryd.pid"
start_precmd=prestart
configtest() {
${command} ${osqueryd_flags} --config_check --config_path=${osqueryd_config} --verbose
}
prestart() {
install -d /var/db/osquery
}
run_rc_command "$1"