summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hubbs <williamh@gentoo.org>2020-03-15 18:07:27 -0500
committerWilliam Hubbs <williamh@gentoo.org>2020-03-15 18:11:01 -0500
commit22ae5af892bcbe16a39954537a55b5940f8dcd81 (patch)
tree3034e3a0275b6e7505431a953c6e2aebfcd18a2a /app-metrics/node_exporter/files
parentsys-kernel/git-sources: Linux patch 5.6-rc6 (diff)
downloadgentoo-22ae5af892bcbe16a39954537a55b5940f8dcd81.tar.gz
gentoo-22ae5af892bcbe16a39954537a55b5940f8dcd81.tar.bz2
gentoo-22ae5af892bcbe16a39954537a55b5940f8dcd81.zip
app-metrics/node_exporter: revbump for install location and go migration
Signed-off-by: William Hubbs <williamh@gentoo.org>
Diffstat (limited to 'app-metrics/node_exporter/files')
-rw-r--r--app-metrics/node_exporter/files/node_exporter.initd23
1 files changed, 23 insertions, 0 deletions
diff --git a/app-metrics/node_exporter/files/node_exporter.initd b/app-metrics/node_exporter/files/node_exporter.initd
new file mode 100644
index 000000000000..3ccddf757a89
--- /dev/null
+++ b/app-metrics/node_exporter/files/node_exporter.initd
@@ -0,0 +1,23 @@
+#!/sbin/openrc-run
+# Copyright 2016-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+description="Prometheus machine metrics exporter"
+pidfile=${pidfile:-"/run/${RC_SVCNAME}.pid"}
+user=${user:-${RC_SVCNAME}}
+group=${group:-${RC_SVCNAME}}
+
+command="/usr/sbin/node_exporter"
+command_args="${command_args:---collector.textfile.directory=/var/lib/node_exporter/}"
+command_background="true"
+start_stop_daemon_args="--user ${user} --group ${group} \
+ --stdout /var/log/node_exporter/${RC_SVCNAME}.log \
+ --stderr /var/log/node_exporter/${RC_SVCNAME}.log"
+
+depend() {
+ after net
+}
+
+start_pre() {
+ checkpath -q -d -m 0755 -o ${user}:${group} /var/log/node_exporter
+}