aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Fink2026-09-27 08:37:37 +0200
committerDennis Fink2026-09-27 08:37:37 +0200
commit19710ce4d51e3104618716dd95b9f8bd5ea4d609 (patch)
tree797ab94ec5137406a8ce593df3cc3c88c72b1cb8
parenta8619c1102d2fda5c63597120bbe45c715b83167 (diff)
downloadprometheus-borgmatic-exporter-19710ce4d51e3104618716dd95b9f8bd5ea4d609.tar.gz
prometheus-borgmatic-exporter-19710ce4d51e3104618716dd95b9f8bd5ea4d609.zip
fix(systemd): wait for network to be online
Ensure the exporter service and timer are started only after the network is considered online, reducing failures when repositories require network access.
-rw-r--r--contrib/prometheus-borgmatic-exporter.service3
-rw-r--r--contrib/prometheus-borgmatic-exporter.timer3
2 files changed, 4 insertions, 2 deletions
diff --git a/contrib/prometheus-borgmatic-exporter.service b/contrib/prometheus-borgmatic-exporter.service
index 4551d34..706a4f5 100644
--- a/contrib/prometheus-borgmatic-exporter.service
+++ b/contrib/prometheus-borgmatic-exporter.service
@@ -1,6 +1,7 @@
[Unit]
Description=Borgmatic Prometheus metrics exporter
-After=network.target
+After=network-online.target
+Wants=network-online.target
[Service]
Type=oneshot
diff --git a/contrib/prometheus-borgmatic-exporter.timer b/contrib/prometheus-borgmatic-exporter.timer
index 61fa6a8..951a774 100644
--- a/contrib/prometheus-borgmatic-exporter.timer
+++ b/contrib/prometheus-borgmatic-exporter.timer
@@ -1,6 +1,7 @@
[Unit]
Description=Run Borgmatic Prometheus metrics exporter daily
-After=network.target
+After=network-online.target
+Wants=network-online.target
[Timer]
OnCalendar=daily