svn commit: r466546 - in head/net-mgmt/grok_exporter: . files

Li-Wen Hsu lwhsu at FreeBSD.org
Thu Apr 5 10:20:42 UTC 2018


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 at 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 at 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
 }


More information about the svn-ports-head mailing list