diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-02-05 18:44:56 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-02-05 18:44:56 +0000 |
commit | 29aabba0ea759c6a2864ff5631735b67ee38e5e0 (patch) | |
tree | ab466b4dfa7abecb401b2f8039d08af4689306bb /app-metrics/prometheus-bin/files | |
parent | d42200bec37eef2a7478d88988ff00addd0a9202 (diff) |
gentoo resync : 05.02.2020
Diffstat (limited to 'app-metrics/prometheus-bin/files')
-rw-r--r-- | app-metrics/prometheus-bin/files/prometheus.confd | 2 | ||||
-rw-r--r-- | app-metrics/prometheus-bin/files/prometheus.initd | 34 |
2 files changed, 36 insertions, 0 deletions
diff --git a/app-metrics/prometheus-bin/files/prometheus.confd b/app-metrics/prometheus-bin/files/prometheus.confd new file mode 100644 index 000000000000..93b41b31624c --- /dev/null +++ b/app-metrics/prometheus-bin/files/prometheus.confd @@ -0,0 +1,2 @@ +# arguments for Prometheus +command_args="" diff --git a/app-metrics/prometheus-bin/files/prometheus.initd b/app-metrics/prometheus-bin/files/prometheus.initd new file mode 100644 index 000000000000..f7371f8ca060 --- /dev/null +++ b/app-metrics/prometheus-bin/files/prometheus.initd @@ -0,0 +1,34 @@ +#!/sbin/openrc-run +# Copyright 2016-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +description="Prometheus monitoring system and time series database" +pidfile=/var/run/${RC_SVCNAME}.pid +user=${user:-${RC_SVCNAME}} +group=${group:-${RC_SVCNAME}} +command_user=${user}:${group} + +command="/usr/bin/prometheus" +command_args="${command_args:---config.file=/etc/prometheus/prometheus.yml --storage.tsdb.path=/var/lib/prometheus/data}" +command_background="true" +error_log=/var/log/${RC_SVCNAME}/${RC_SVCNAME}.log +output_log=/var/log/${RC_SVCNAME}/${RC_SVCNAME}.log + +extra_started_commands="reload" + +depend() { + after net +} + +reload() { + ebegin "Reloading configuration for ${RC_SVCNAME}" + case "$supervisor" in + supervise-daemon) + supervise-daemon ${RC_SVCNAME} --signal HUP + ;; + *) + start-stop-daemon --signal HUP --pidfile "${pidfile}" + ;; + esac + eend $? "Failed to reload ${RC_SVCNAME}" +} |