aboutsummaryrefslogtreecommitdiffstats
path: root/testing/prometheus-unbound-exporter/unbound-exporter.initd
diff options
context:
space:
mode:
Diffstat (limited to 'testing/prometheus-unbound-exporter/unbound-exporter.initd')
-rwxr-xr-xtesting/prometheus-unbound-exporter/unbound-exporter.initd21
1 files changed, 21 insertions, 0 deletions
diff --git a/testing/prometheus-unbound-exporter/unbound-exporter.initd b/testing/prometheus-unbound-exporter/unbound-exporter.initd
new file mode 100755
index 00000000000..4c7364969d3
--- /dev/null
+++ b/testing/prometheus-unbound-exporter/unbound-exporter.initd
@@ -0,0 +1,21 @@
+#!/sbin/openrc-run
+supervisor=supervise-daemon
+
+command="/usr/bin/unbound_exporter"
+command_args="$ARGS"
+command_background="yes"
+command_user="prometheus:prometheus"
+
+logdir="/var/log/prometheus"
+error_log="$logdir/${SVCNAME}.log"
+pidfile="/var/run/${SVCNAME}.pid"
+
+depend() {
+ need net
+ after firewall
+}
+
+start_pre() {
+ checkpath -d -o $command_user -m755 $logdir
+ checkpath -f -o $command_user -m644 $error_log
+}