git: d48f60344b6d - main - sysutils/node_exporter: Ability to change default pidfile location
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 28 Dec 2025 13:55:00 UTC
The branch main has been updated by rodrigo:
URL: https://cgit.FreeBSD.org/ports/commit/?id=d48f60344b6d50e1cc6fab4862d1391a0eb40071
commit d48f60344b6d50e1cc6fab4862d1391a0eb40071
Author: Jakub SzafraĆski <s@samu.pl>
AuthorDate: 2025-04-14 14:18:18 +0000
Commit: Rodrigo Osorio <rodrigo@FreeBSD.org>
CommitDate: 2025-12-28 13:48:38 +0000
sysutils/node_exporter: Ability to change default pidfile location
Bump PORTREVISION
PR: 289009
Approved by: David O'Rourke <dor.bsd@xm0.uk>(maintainer)
---
sysutils/node_exporter/Makefile | 2 +-
sysutils/node_exporter/files/node_exporter.in | 10 ++++++----
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/sysutils/node_exporter/Makefile b/sysutils/node_exporter/Makefile
index 0374b582d3c1..ba0da5497dc7 100644
--- a/sysutils/node_exporter/Makefile
+++ b/sysutils/node_exporter/Makefile
@@ -1,7 +1,7 @@
PORTNAME= node_exporter
DISTVERSIONPREFIX= v
DISTVERSION= 1.9.1
-PORTREVISION= 6
+PORTREVISION= 7
CATEGORIES= sysutils
MAINTAINER= dor.bsd@xm0.uk
diff --git a/sysutils/node_exporter/files/node_exporter.in b/sysutils/node_exporter/files/node_exporter.in
index b6e452dd3780..b40aa85a8af8 100644
--- a/sysutils/node_exporter/files/node_exporter.in
+++ b/sysutils/node_exporter/files/node_exporter.in
@@ -19,6 +19,8 @@
# Default is ":9100".
# node_exporter_textfile_dir (string): Set directory that node_exporter will watch
# Default is "/var/tmp/node_exporter".
+# node_exporter_pidfile (string): Set location of the node_exporter pidfile
+# Default is "/var/run/node_exporter.pid".
. /etc/rc.subr
@@ -33,12 +35,12 @@ load_rc_config $name
: ${node_exporter_args:=""}
: ${node_exporter_listen_address:=":9100"}
: ${node_exporter_textfile_dir:="/var/tmp/node_exporter"}
+: ${node_exporter_pidfile:="/var/run/node_exporter.pid"}
-pidfile=/var/run/node_exporter.pid
command="/usr/sbin/daemon"
procname="%%PREFIX%%/bin/node_exporter"
-command_args="-f -p ${pidfile} -T ${name} \
+command_args="-f -p ${node_exporter_pidfile} -T ${name} \
/usr/bin/env ${procname} \
--web.listen-address=${node_exporter_listen_address} \
--collector.textfile.directory=${node_exporter_textfile_dir} \
@@ -48,11 +50,11 @@ start_precmd=node_exporter_startprecmd
node_exporter_startprecmd()
{
- if [ ! -e ${pidfile} ]; then
+ if [ ! -e ${node_exporter_pidfile} ]; then
install \
-o ${node_exporter_user} \
-g ${node_exporter_group} \
- /dev/null ${pidfile};
+ /dev/null ${node_exporter_pidfile};
fi
if [ ! -d ${node_exporter_textfile_dir} ]; then
install \