ports/net-mgmt/netdata/files/netdata.in
Mahdi Mokhtari 44c345f784 net-mgmt/netdata: Update to the latest release (v1.13.0)
This netdata release fixes upstream Bugs:
 - Bug #5670: "postgres: socket: update() unhandled exception"

It also includes features:
 * Kubernetes: Helm chart
 * Reduce memory usage

While here:
Add a CUPS option to enable/disable the plugin
Do cleanup on plist (new options added, fix permissions [FreeIPMI, etc])
Unbreak python plugins (shebangfix)
Make PID file configurable through rc script

For more info: https://github.com/netdata/netdata/releases/tag/v1.13.0

PR:		236258 235462
Reported by:	Dries Michiels <driesm.michiels@gmail.com>, geraud@gcu.info
Sponsored by:	The FreeBSD Foundation
2019-03-21 15:05:27 +00:00

36 lines
725 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"}
: ${netdata_pid="%%NETDATA_PERST%%/${name}.pid"}
procname="%%PREFIX%%/sbin/${name}"
command="/usr/sbin/daemon"
command_args="-c -f ${procname} -u ${netdata_user} -P ${netdata_pid} ${netdata_args}"
required_files="%%ETCDIR%%/${name}.conf"
run_rc_command "$1"