Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Apr 2018 10:20:41 +0000 (UTC)
From:      Li-Wen Hsu <lwhsu@FreeBSD.org>
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
Message-ID:  <201804051020.w35AKfRO060138@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 <gasol.wu@gmail.com> (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
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201804051020.w35AKfRO060138>