#!/bin/sh # $FreeBSD: head/net/graphite_exporter/files/graphite_exporter.in 529909 2020-03-30 19:18:03Z decke $ # # PROVIDE: graphite_exporter # REQUIRE: DAEMON # KEYWORD: shutdown # # graphite_exporter_enable (bool): Set to "YES" to enable graphite_exporter. # (default: "NO") # # graphite_exporter_logfile (str): File where to write log entries. # (default: "/var/log/graphite_exporter.log") # # graphite_exporter_user (str): User to run graphite_exporter process # (default: "prometheus") . /etc/rc.subr name=graphite_exporter rcvar=graphite_exporter_enable load_rc_config $name : ${graphite_exporter_enable="NO"} : ${graphite_exporter_logfile="/var/log/maillog"} : ${graphite_exporter_pidfile:="/var/run/graphite_exporter.pid"} : ${graphite_exporter_user:="prometheus"} command="/usr/local/bin/graphite_exporter" command_args="> \${graphite_exporter_logfile} 2>&1" start_cmd="/usr/sbin/daemon -u ${graphite_exporter_user} ${command} ${command_args}" run_rc_command "$1"