mirror of
https://git.freebsd.org/ports.git
synced 2025-06-09 14:50:31 -04:00
NetData is scalable, distributed real-time performance and health monitoring. PR: 216497 Submitted by: Mahdi Mokhtari <mokhi64@gmail.com> Reviewed by: lifanov, matthew Approved by: matthew (mentor) Differential Revision: https://reviews.freebsd.org/D9351
36 lines
707 B
Bash
36 lines
707 B
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
# PROVIDE: netdata
|
|
# REQUIRE: LOGIN
|
|
# KEYWORD: shutdown
|
|
|
|
#
|
|
# Add the following line to /etc/rc.conf to enable netdata:
|
|
# netdata_enable (bool): Set to "NO" by default.
|
|
# Set it to "YES" to enable netdata.
|
|
# netdata_args (str): Custom additional arguments to be passed
|
|
# to netdata (default empty).
|
|
#
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="netdata"
|
|
rcvar=netdata_enable
|
|
|
|
load_rc_config $name
|
|
|
|
: ${netdata_enable="NO"}
|
|
|
|
netdata_user="netdata"
|
|
pidfile="%%NETDATA_PERST%%/${name}.pid"
|
|
procname="%%PREFIX%%/sbin/${name}"
|
|
command="/usr/sbin/daemon"
|
|
command_args="-c -f ${procname} -u ${netdata_user} -P ${pidfile} ${netdata_args}"
|
|
|
|
required_files="%%ETCDIR%%/${name}.conf"
|
|
|
|
run_rc_command "$1"
|
|
|