From owner-svn-ports-head@freebsd.org Thu Apr 5 10:20:42 2018 Return-Path: Delivered-To: svn-ports-head@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 3C084F9BA44; Thu, 5 Apr 2018 10:20:42 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E146B73D1B; Thu, 5 Apr 2018 10:20:41 +0000 (UTC) (envelope-from lwhsu@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 C2940213C8; Thu, 5 Apr 2018 10:20:41 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w35AKfPq060154; Thu, 5 Apr 2018 10:20:41 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w35AKfRO060138; Thu, 5 Apr 2018 10:20:41 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <201804051020.w35AKfRO060138@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Thu, 5 Apr 2018 10:20:41 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r466546 - in head/net-mgmt/grok_exporter: . files X-SVN-Group: ports-head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: in head/net-mgmt/grok_exporter: . files X-SVN-Commit-Revision: 466546 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Apr 2018 10:20:42 -0000 Author: lwhsu Date: Thu Apr 5 10:20:41 2018 New Revision: 466546 URL: https://svnweb.freebsd.org/changeset/ports/466546 Log: - Change {owner,group} to prometheus PR: 227284 Submitted by: Gasol Wu (maintainer) Modified: head/net-mgmt/grok_exporter/Makefile head/net-mgmt/grok_exporter/files/grok_exporter.in Modified: head/net-mgmt/grok_exporter/Makefile ============================================================================== --- head/net-mgmt/grok_exporter/Makefile Thu Apr 5 09:33:31 2018 (r466545) +++ head/net-mgmt/grok_exporter/Makefile Thu Apr 5 10:20:41 2018 (r466546) @@ -3,6 +3,7 @@ PORTNAME= grok_exporter PORTVERSION= 0.2.3 DISTVERSIONPREFIX=v +PORTREVISION= 1 CATEGORIES= net-mgmt MAINTAINER= gasol.wu@gmail.com @@ -20,6 +21,8 @@ USE_GITHUB= yes GH_ACCOUNT= fstab logstash-plugins:plugins GH_PROJECT= logstash-patterns-core:plugins GH_TAGNAME= 6d25c13:plugins +USERS= prometheus +GROUPS= prometheus GO_PKGNAME= github.com/${GH_ACCOUNT}/${PORTNAME} USE_RC_SUBR= grok_exporter Modified: head/net-mgmt/grok_exporter/files/grok_exporter.in ============================================================================== --- head/net-mgmt/grok_exporter/files/grok_exporter.in Thu Apr 5 09:33:31 2018 (r466545) +++ head/net-mgmt/grok_exporter/files/grok_exporter.in Thu Apr 5 10:20:41 2018 (r466546) @@ -13,9 +13,9 @@ # grok_exporter_config (string): Set path to config file # Default is "%%ETCDIR%%/config.yml". # grok_exporter_user (string): Set user that grok_exporter will run under -# Default is "nobody". +# Default is "prometheus". # grok_exporter_group (string): Set group that grok_exporter will run under -# Default is "nobody". +# Default is "prometheus". . /etc/rc.subr @@ -27,8 +27,8 @@ load_rc_config $name : ${grok_exporter_enable:=NO} : ${grok_exporter_config:=%%ETCDIR%%/config.yml} -: ${grok_exporter_user:=nobody} -: ${grok_exporter_group:=nobody} +: ${grok_exporter_user:=prometheus} +: ${grok_exporter_group:=prometheus} pidfile=/var/run/grok_exporter.pid command=/usr/sbin/daemon @@ -39,7 +39,9 @@ start_precmd=grok_exporter_startprecmd grok_exporter_startprecmd() { - if [ ! -e ${pidfile} ]; then + if [ -e ${pidfile} ]; then + chown ${grok_exporter_user}:${grok_exporter_group} ${pidfile}; + else install -o ${grok_exporter_user} -g ${grok_exporter_group} /dev/null ${pidfile}; fi }