aboutsummaryrefslogtreecommitdiff
path: root/contrib/prometheus-pacman-exporter.service
diff options
context:
space:
mode:
authorDennis Fink2026-09-27 13:14:07 +0200
committerDennis Fink2026-09-27 13:20:47 +0200
commit555d50bfd10b1ac983aec17cf5b3cdf3a9cb99d7 (patch)
tree38539bd205d8b7434b8c02c8482a9a4c0f694268 /contrib/prometheus-pacman-exporter.service
parent142af72ebc9e1c2151101d6c3318ee48fdf00a87 (diff)
downloadprometheus-pacman-exporter-555d50bfd10b1ac983aec17cf5b3cdf3a9cb99d7.tar.gz
prometheus-pacman-exporter-555d50bfd10b1ac983aec17cf5b3cdf3a9cb99d7.zip
fix(commands): classify command failures for retries
Allow command invocations to define which child exit codes are considered successful, including checkupdates exit status 2 when no updates are available. Classify unexpected child command failures as exporter exit status 1 so systemd treats them as runtime failures eligible for retry. Keep exit status 2 for CLI usage errors, which are configuration problems and should not be retried. Update the systemd service with RestartPreventExitStatus=2 so only retryable runtime failures trigger the configured restart policy.
Diffstat (limited to 'contrib/prometheus-pacman-exporter.service')
-rw-r--r--contrib/prometheus-pacman-exporter.service1
1 files changed, 1 insertions, 0 deletions
diff --git a/contrib/prometheus-pacman-exporter.service b/contrib/prometheus-pacman-exporter.service
index b463cbf..b54c058 100644
--- a/contrib/prometheus-pacman-exporter.service
+++ b/contrib/prometheus-pacman-exporter.service
@@ -13,6 +13,7 @@ EnvironmentFile=/etc/conf.d/prometheus-pacman-exporter
ExecStart=/usr/bin/prometheus-pacman-exporter $PROMETHEUS_PACMAN_EXPORTER_ARGS
Restart=on-failure
+RestartPreventExitStatus=2
RestartSec=10min
User=root