summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-metrics/chrony_exporter/files')
-rw-r--r--app-metrics/chrony_exporter/files/chrony_exporter.confd2
-rw-r--r--app-metrics/chrony_exporter/files/chrony_exporter.initd17
2 files changed, 19 insertions, 0 deletions
diff --git a/app-metrics/chrony_exporter/files/chrony_exporter.confd b/app-metrics/chrony_exporter/files/chrony_exporter.confd
new file mode 100644
index 000000000000..0fa8c6ec9b45
--- /dev/null
+++ b/app-metrics/chrony_exporter/files/chrony_exporter.confd
@@ -0,0 +1,2 @@
+# arguments for chrony_exporter
+command_args="--collector.tracking --collector.sources"
diff --git a/app-metrics/chrony_exporter/files/chrony_exporter.initd b/app-metrics/chrony_exporter/files/chrony_exporter.initd
new file mode 100644
index 000000000000..7cddf925322e
--- /dev/null
+++ b/app-metrics/chrony_exporter/files/chrony_exporter.initd
@@ -0,0 +1,17 @@
+#!/sbin/openrc-run
+# Copyright 2016-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+description="Prometheus chrony metrics exporter"
+pidfile=${pidfile:-"/run/${RC_SVCNAME}.pid"}
+user=${user:-${RC_SVCNAME}}
+group=${group:-${RC_SVCNAME}}
+
+command="/usr/bin/chrony_exporter"
+command_args="${command_args}"
+command_background="true"
+start_stop_daemon_args="--user ${user} --group ${group}"
+
+depend() {
+ after chronyd
+}