Date: Fri, 5 Apr 2019 19:50:35 +0000 (UTC) From: Luca Pizzamiglio <pizzamig@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r497983 - in head/net-mgmt/prometheus-collectd-exporter: . files Message-ID: <201904051950.x35JoZ6j097527@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pizzamig Date: Fri Apr 5 19:50:35 2019 New Revision: 497983 URL: https://svnweb.freebsd.org/changeset/ports/497983 Log: net-mgmt/prometheus-collectd-exporter: Update to 0.4.0 The patch is also adding a rc script PR: 225814 Submitted by: maintainer Added: head/net-mgmt/prometheus-collectd-exporter/files/ head/net-mgmt/prometheus-collectd-exporter/files/collectd_exporter.in (contents, props changed) Modified: head/net-mgmt/prometheus-collectd-exporter/Makefile head/net-mgmt/prometheus-collectd-exporter/distinfo Modified: head/net-mgmt/prometheus-collectd-exporter/Makefile ============================================================================== --- head/net-mgmt/prometheus-collectd-exporter/Makefile Fri Apr 5 19:44:42 2019 (r497982) +++ head/net-mgmt/prometheus-collectd-exporter/Makefile Fri Apr 5 19:50:35 2019 (r497983) @@ -1,7 +1,8 @@ # $FreeBSD$ PORTNAME= prometheus-collectd-exporter -PORTVERSION= 0.3.1 +PORTVERSION= 0.4.0 +DISTVERSIONPREFIX= v CATEGORIES= net-mgmt MAINTAINER= dsp@php.net @@ -16,5 +17,7 @@ GH_ACCOUNT= prometheus GH_PROJECT= collectd_exporter PLIST_FILES= bin/prometheus-collectd-exporter + +USE_RC_SUBR= collectd_exporter .include <bsd.port.mk> Modified: head/net-mgmt/prometheus-collectd-exporter/distinfo ============================================================================== --- head/net-mgmt/prometheus-collectd-exporter/distinfo Fri Apr 5 19:44:42 2019 (r497982) +++ head/net-mgmt/prometheus-collectd-exporter/distinfo Fri Apr 5 19:50:35 2019 (r497983) @@ -1,3 +1,3 @@ -TIMESTAMP = 1525337348 -SHA256 (prometheus-collectd_exporter-0.3.1_GH0.tar.gz) = a64c131849f9bb93334f89a311b276cf6a52fa37bc23956743c83434e104ff40 -SIZE (prometheus-collectd_exporter-0.3.1_GH0.tar.gz) = 672609 +TIMESTAMP = 1554457871 +SHA256 (prometheus-collectd_exporter-v0.4.0_GH0.tar.gz) = a88f9f93b12f7b9843e86038ae6f35503e21806eb01dd5c3f4e677faf1f80a89 +SIZE (prometheus-collectd_exporter-v0.4.0_GH0.tar.gz) = 1031406 Added: head/net-mgmt/prometheus-collectd-exporter/files/collectd_exporter.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/prometheus-collectd-exporter/files/collectd_exporter.in Fri Apr 5 19:50:35 2019 (r497983) @@ -0,0 +1,66 @@ +#!/bin/sh + +# PROVIDE: collectd_exporter +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# collectd_exporter_enable (bool): Set to NO by default. +# Set it to YES to enable collectd_exporter. +# collectd_exporter_user (string): Set user that collectd_exporter will run under +# Default is "nobody". +# collectd_exporter_group (string): Set group that collectd_exporter will run under +# Default is "nobody". +# collectd_exporter_args (string): Set extra arguments to pass to collectd_exporter +# Default is "". +# collectd_exporter_listen_address (string):Set ip:port that collectd_exporter will listen on +# Default is ":9103". +# collectd_exporter_collectd_listen_address (string):Set ip:port that collectd_exporter will listen on +# Default is ":25826". + +. /etc/rc.subr + +name=collectd_exporter +rcvar=collectd_exporter_enable + +load_rc_config $name + +: ${collectd_exporter_enable:="NO"} +: ${collectd_exporter_user:="nobody"} +: ${collectd_exporter_group:="nobody"} +: ${collectd_exporter_args:=""} +: ${collectd_exporter_log_file:="/var/log/collectd_exporter.log"} +: ${collectd_exporter_listen_address:=":9103"} +: ${collectd_exporter_collectd_listen_address:=":25826"} + +pidfile=/var/run/collectd_exporter.pid +command="/usr/sbin/daemon" +procname="%%PREFIX%%/bin/prometheus-collectd-exporter" +command_args="-p ${pidfile} /usr/bin/env ${procname} \ + --collectd.listen-address=${collectd_exporter_collectd_listen_address} \ + --web.listen-address=${collectd_exporter_listen_address} \ + ${collectd_exporter_args} >> ${collectd_exporter_log_file} 2>&1" + +start_precmd=collectd_exporter_startprecmd + +collectd_exporter_startprecmd() +{ + if [ ! -e ${pidfile} ]; then + install \ + -o ${collectd_exporter_user} \ + -g ${collectd_exporter_group} \ + /dev/null ${pidfile}; + fi + if [ ! -e ${collectd_exporter_log_file} ]; then + install \ + -o ${collectd_exporter_user} \ + -g ${collectd_exporter_group} \ + -m 640 \ + /dev/null ${collectd_exporter_log_file}; + fi +} + +load_rc_config $name +run_rc_command "$1"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904051950.x35JoZ6j097527>