summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Rüger <mrueg@gentoo.org>2016-12-13 20:33:08 +0100
committerManuel Rüger <mrueg@gentoo.org>2016-12-14 13:51:20 +0100
commit2f538c275cc9670a15d2c03070cfe9b5e491115b (patch)
tree7e795dc062161cf190c00d768cd8f7a84023b366 /net-analyzer/prometheus/files/prometheus.initd
parentkde-apps/kdebase-kioslaves: allow all slots of kde-apps/kdialog (diff)
downloadgentoo-2f538c275cc9670a15d2c03070cfe9b5e491115b.tar.gz
gentoo-2f538c275cc9670a15d2c03070cfe9b5e491115b.tar.bz2
gentoo-2f538c275cc9670a15d2c03070cfe9b5e491115b.zip
net-analyzer/prometheus: Initial version
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'net-analyzer/prometheus/files/prometheus.initd')
-rw-r--r--net-analyzer/prometheus/files/prometheus.initd25
1 files changed, 25 insertions, 0 deletions
diff --git a/net-analyzer/prometheus/files/prometheus.initd b/net-analyzer/prometheus/files/prometheus.initd
new file mode 100644
index 000000000000..b024f3b02d9b
--- /dev/null
+++ b/net-analyzer/prometheus/files/prometheus.initd
@@ -0,0 +1,25 @@
+#!/sbin/openrc-run
+# Copyright 2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+description="Prometheus monitoring system and time series database"
+pidfile=${pidfile:-"/run/${SVCNAME}/${SVCNAME}.pid"}
+user=${user:-${SVCNAME}}
+group=${group:-${SVCNAME}}
+
+command="/usr/bin/prometheus"
+command_args="${command_args:-config.file=/etc/prometheus/prometheus.yml -storage.local.path=/var/lib/prometheus/data}"
+command_background="true"
+start_stop_daemon_args="--user ${user} --group ${group} \
+ --stdout /var/log/${SVCNAME}/${SVCNAME}.log \
+ --stderr /var/log/${SVCNAME}/${SVCNAME}.log"
+
+depend() {
+ need net
+ after net
+}
+
+start_pre() {
+ checkpath -d -m 0755 -o "${user}":"${group}" "${pidfile%/*}"
+}