From 6641b6241501023b0c2cb4c5b03c6648facae714 Mon Sep 17 00:00:00 2001 From: Mark Eaton Date: Sat, 24 Jan 2026 21:53:16 -0500 Subject: [PATCH] configuration for gitea notifications --- libguides-notifier/libguides-notifier.service | 5 ++--- notify/notify-gitea-failure@.service | 6 +++--- profile/profile-stats.service | 1 + renovate/renovate.service | 6 ++++-- saints/saints.service | 3 ++- 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/libguides-notifier/libguides-notifier.service b/libguides-notifier/libguides-notifier.service index d222912..4d7584c 100644 --- a/libguides-notifier/libguides-notifier.service +++ b/libguides-notifier/libguides-notifier.service @@ -1,14 +1,13 @@ -# lives at ~/.config/systemd/user/libguides-notifier.service - # User-level systemd service to run main.py # Uses a wrapper script so the working directory and .env are found correctly. # Configuration is via ~/.config/libguides-notifier.env, no in-file path edits needed. # Create that file with one line: -# REPO_PATH=/absolute/path/to/this/repo +# REPO_PATH=/absolute/path/to/project # Then run: # systemctl --user daemon-reload [Unit] Description=Run main.py (LibGuides notifier) +OnFailure=notify-gitea-failure@%n.service [Service] Type=oneshot diff --git a/notify/notify-gitea-failure@.service b/notify/notify-gitea-failure@.service index 74ce838..d2bb5ba 100644 --- a/notify/notify-gitea-failure@.service +++ b/notify/notify-gitea-failure@.service @@ -1,8 +1,8 @@ [Unit] -Description=Send Teams failure notification for %i +Description=Send Gitea failure notification for %i [Service] Type=oneshot -ExecStart=/usr/local/bin/notify-teams.sh %i failure +ExecStart=/usr/local/bin/notify-gitea.sh %i failure # Load webhook URL from environment file -EnvironmentFile=-/etc/notify-teams.conf +EnvironmentFile=-/etc/notify-gitea.conf diff --git a/profile/profile-stats.service b/profile/profile-stats.service index 7302d76..3bb81c2 100644 --- a/profile/profile-stats.service +++ b/profile/profile-stats.service @@ -8,6 +8,7 @@ # systemctl --user daemon-reload [Unit] Description=Run update_profile.py (profile stats updater) +OnFailure=notify-gitea-failure@%n.service [Service] Type=oneshot diff --git a/renovate/renovate.service b/renovate/renovate.service index 6f3fe37..ee2f5be 100644 --- a/renovate/renovate.service +++ b/renovate/renovate.service @@ -1,5 +1,3 @@ -# lives at /etc/systemd/system/renovate.service - [Unit] Description=Renovate Bot After=network-online.target @@ -30,3 +28,7 @@ SyslogIdentifier=renovate [Install] WantedBy=multi-user.target + +[Unit] +Description=Renovate dependency updates +OnFailure=notify-gitea-failure@%n.service diff --git a/saints/saints.service b/saints/saints.service index 7bf0f39..94dab77 100644 --- a/saints/saints.service +++ b/saints/saints.service @@ -8,13 +8,14 @@ # systemctl --user daemon-reload [Unit] Description=Run get_saint_of_the_day.py (profile stats updater) +OnFailure=notify-gitea-failure@%n.service [Service] Type=oneshot EnvironmentFile=%h/.config/saints.env ExecStartPre=/usr/bin/nm-online -q ExecStartPre=/bin/bash -c 'for i in {1..30}; do getent hosts tildegit.org && exit 0; sleep 1; done; exit 1' -ExecStart=/bin/bash -lc 'cd ${REPO_PATH} && uv run get_saint_of_the_day.py' +ExecStart=/bin/bash -lc 'cd ${REPO_PATH} && uv run get_saint_of_the_day.py --post' [Install] WantedBy=default.target