From owner-svn-ports-all@freebsd.org Fri Apr 5 19:50:36 2019 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 860CF155C49A; Fri, 5 Apr 2019 19:50:36 +0000 (UTC) (envelope-from pizzamig@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2A18071D9B; Fri, 5 Apr 2019 19:50:36 +0000 (UTC) (envelope-from pizzamig@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0531719C99; Fri, 5 Apr 2019 19:50:36 +0000 (UTC) (envelope-from pizzamig@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x35JoZT6097529; Fri, 5 Apr 2019 19:50:35 GMT (envelope-from pizzamig@FreeBSD.org) Received: (from pizzamig@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x35JoZ6j097527; Fri, 5 Apr 2019 19:50:35 GMT (envelope-from pizzamig@FreeBSD.org) Message-Id: <201904051950.x35JoZ6j097527@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pizzamig set sender to pizzamig@FreeBSD.org using -f From: Luca Pizzamiglio Date: Fri, 5 Apr 2019 19:50:35 +0000 (UTC) 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 X-SVN-Group: ports-head X-SVN-Commit-Author: pizzamig X-SVN-Commit-Paths: in head/net-mgmt/prometheus-collectd-exporter: . files X-SVN-Commit-Revision: 497983 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2A18071D9B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.951,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Apr 2019 19:50:36 -0000 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 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"