aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Fink2026-09-27 08:48:30 +0200
committerDennis Fink2026-09-27 08:48:30 +0200
commitcb9dc38c1235065346dd9aa6783de8d7d72a8317 (patch)
tree59cc11f2b95371471cd957580bb11e9af99571cf
parent37cbc5840fe53776ba9ebbbce1aa4cb61ceec7f9 (diff)
downloadprometheus-pacman-exporter-cb9dc38c1235065346dd9aa6783de8d7d72a8317.tar.gz
prometheus-pacman-exporter-cb9dc38c1235065346dd9aa6783de8d7d72a8317.zip
fix(systemd): wait for network to be online
Order the exporter service and timer after network-online.target and add a Wants dependency so network connectivity is established before they run.
-rw-r--r--contrib/prometheus-pacman-exporter.service3
-rw-r--r--contrib/prometheus-pacman-exporter.timer3
2 files changed, 4 insertions, 2 deletions
diff --git a/contrib/prometheus-pacman-exporter.service b/contrib/prometheus-pacman-exporter.service
index 82b5854..3b3dfa6 100644
--- a/contrib/prometheus-pacman-exporter.service
+++ b/contrib/prometheus-pacman-exporter.service
@@ -1,6 +1,7 @@
[Unit]
Description=Pacman Prometheus metrics exporter
-After=network.target
+After=network-online.target
+Wants=network-online.target
[Service]
Type=oneshot
diff --git a/contrib/prometheus-pacman-exporter.timer b/contrib/prometheus-pacman-exporter.timer
index 01c4a2c..46afeea 100644
--- a/contrib/prometheus-pacman-exporter.timer
+++ b/contrib/prometheus-pacman-exporter.timer
@@ -1,6 +1,7 @@
[Unit]
Description=Run Pacman Prometheus metrics exporter daily
-After=network.target
+After=network-online.target
+Wants=network-online.target
[Timer]
OnCalendar=daily