* [gentoo-commits] repo/gentoo:master commit in: app-metrics/prometheus/, app-metrics/prometheus/files/
@ 2021-03-14 10:43 Mikle Kolyada
0 siblings, 0 replies; only message in thread
From: Mikle Kolyada @ 2021-03-14 10:43 UTC (permalink / raw
To: gentoo-commits
commit: 73726a7e03c87d7014fbdc71a0d4276980066d46
Author: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 14 10:42:50 2021 +0000
Commit: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Sun Mar 14 10:43:47 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=73726a7e
app-metrics/prometheus: Add systemd unit support
Bug: https://bugs.gentoo.org/695988
Package-Manager: Portage-3.0.13, Repoman-3.0.2
Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>
app-metrics/prometheus/files/prometheus.service | 22 ++++++++++++++++++++++
...s-2.21.0.ebuild => prometheus-2.21.0-r1.ebuild} | 7 +++++--
2 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/app-metrics/prometheus/files/prometheus.service b/app-metrics/prometheus/files/prometheus.service
new file mode 100644
index 00000000000..ebd8a901d1f
--- /dev/null
+++ b/app-metrics/prometheus/files/prometheus.service
@@ -0,0 +1,22 @@
+[Unit]
+Description=Prometheus
+Wants=network-online.target
+After=network-online.target
+
+[Service]
+Type=simple
+User=prometheus
+Group=prometheus
+ExecStart=/usr/bin/prometheus \
+ --web.enable-lifecycle \
+ --config.file=/etc/prometheus/prometheus.yml \
+ --storage.tsdb.path="/var/lib/prometheus/data" \
+ --web.console.templates=/etc/prometheus/consoles \
+ --web.console.libraries=/etc/prometheus/console_libraries \
+ --web.listen-address=0.0.0.0:9090 \
+ --web.enable-admin-api
+
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/app-metrics/prometheus/prometheus-2.21.0.ebuild b/app-metrics/prometheus/prometheus-2.21.0-r1.ebuild
similarity index 94%
rename from app-metrics/prometheus/prometheus-2.21.0.ebuild
rename to app-metrics/prometheus/prometheus-2.21.0-r1.ebuild
index b4bb7a694d1..f2030b8dd9e 100644
--- a/app-metrics/prometheus/prometheus-2.21.0.ebuild
+++ b/app-metrics/prometheus/prometheus-2.21.0-r1.ebuild
@@ -1,8 +1,10 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit go-module
+
+inherit go-module systemd
+
MY_PV=v${PV/_rc/-rc.}
GIT_COMMIT=e83ef207b
@@ -44,6 +46,7 @@ src_install() {
dosym ../../usr/share/prometheus/console_libraries /etc/prometheus/console_libraries
dosym ../../usr/share/prometheus/consoles /etc/prometheus/consoles
+ systemd_dounit "${FILESDIR}"/prometheus.service
newinitd "${FILESDIR}"/prometheus.initd prometheus
newconfd "${FILESDIR}"/prometheus.confd prometheus
keepdir /var/log/prometheus /var/lib/prometheus
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-03-14 10:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-14 10:43 [gentoo-commits] repo/gentoo:master commit in: app-metrics/prometheus/, app-metrics/prometheus/files/ Mikle Kolyada
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox