From 555d50bfd10b1ac983aec17cf5b3cdf3a9cb99d7 Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Sun, 27 Sep 2026 13:14:07 +0200 Subject: 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. --- contrib/prometheus-pacman-exporter.service | 1 + 1 file changed, 1 insertion(+) (limited to 'contrib/prometheus-pacman-exporter.service') 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 -- cgit v1.3.1