[PATCH v2] community/prometheus: add reload to init.d
Export this patch
---
community/prometheus/APKBUILD | 4 ++--
community/prometheus/prometheus.initd | 7 +++++++
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/community/prometheus/APKBUILD b/community/prometheus/APKBUILD
index e5594d6942..14fec9a975 100644
--- a/community/prometheus/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=prometheus
pkgver=2.15.1
-pkgrel=3
+pkgrel=4
pkgdesc="The Prometheus monitoring system and time series database"
url="https://github.com/prometheus/prometheus"
arch="all"
@@ -72,4 +72,4 @@ package() {
sha512sums="b08dfa48bddb6e007cd0fd4553847e824d6adfc047d97151b8dd12dbd1f67cfb9301824b320f1cabe9644159e6968b3fd2ee8104a5d53822a9965423c4bb47b5 prometheus-2.15.1.tar.gz
24b34e586238d5b331639aa5c43b6a927692f251af2cea2787335eab30d2fc7d46975059595db4697ae0dc1d35b5e23cfc4e4b2e424442c209a05283ca22a239 prometheus.confd
-bdc179cb3b8b5d3416e74a0b31002bd7b456b204404579dd40c38cade43eb26b106d16ea2597755035035eca567d34bfa44913eaa28870c3f22e1105d47908ab prometheus.initd"
+70762af1c3aa04725a5e33407228f139e2a328c52a57bd17538901784cace8bea02d9fc8cdd7806c1713c2b2319655104204a06c4c3e8dc1ccdaaa2fd8215252 prometheus.initd"
diff --git a/community/prometheus/prometheus.initd b/community/prometheus/prometheus.initd
index 446466225b..3e64da7ad6 100644
--- a/community/prometheus/prometheus.initd
@@ -7,6 +7,7 @@ command_args="--config.file=$prometheus_config_file \
--storage.tsdb.path=$prometheus_storage_path \
--storage.tsdb.retention.time=$prometheus_retention_time"
command_user="prometheus:prometheus"
+extra_started_commands="reload"
start_pre() {
[ -n "$output_log" ] && checkpath -f "$output_log" \
@@ -15,3 +16,9 @@ start_pre() {
-m 644 -o prometheus:prometheus
checkpath -d "$prometheus_storage_path" -m 755 -o prometheus:prometheus
}
+
+reload() {
+ ebegin "Reloading $RC_SVCNAME"
+ supervise-daemon $RC_SVCNAME --signal HUP
+ eend $?
+}
--
2.24.1