From: "Mikle Kolyada" <zlogene@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-metrics/prometheus/, app-metrics/prometheus/files/
Date: Sun, 14 Mar 2021 10:43:50 +0000 (UTC) [thread overview]
Message-ID: <1615718627.73726a7e03c87d7014fbdc71a0d4276980066d46.zlogene@gentoo> (raw)
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
reply other threads:[~2021-03-14 10:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1615718627.73726a7e03c87d7014fbdc71a0d4276980066d46.zlogene@gentoo \
--to=zlogene@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox