From d442ee427d764c800317b75fe9d11071eed84f46 Mon Sep 17 00:00:00 2001 From: Mark Eaton Date: Fri, 20 Feb 2026 17:42:16 -0500 Subject: [PATCH] add retry on failure for saints.service If the Mastodon post fails (e.g. instance temporarily down), systemd will retry up to 5 times at 15-minute intervals over a 12-hour window before triggering the OnFailure notification. Co-Authored-By: Claude Opus 4.6 --- saints/saints.service | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/saints/saints.service b/saints/saints.service index 2f508eb..94b1408 100644 --- a/saints/saints.service +++ b/saints/saints.service @@ -9,9 +9,13 @@ [Unit] Description=Run get_saint_of_the_day.py (profile stats updater) OnFailure=notify-gitea-failure@%n.service +StartLimitBurst=5 +StartLimitIntervalSec=43200 [Service] Type=oneshot +Restart=on-failure +RestartSec=900 EnvironmentFile=%h/.config/saints.env ExecStartPre=/usr/bin/nm-online -q ExecStartPre=/bin/bash -c 'for i in {1..600}; do getent hosts tildegit.org && exit 0; sleep 1; done; exit 1'