From 133ed9811acb97f737667047e2025076e38b3653 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin <4533074+alexAubin@users.noreply.github.com> Date: Sat, 8 Jun 2024 19:19:19 +0200 Subject: [PATCH] maintenance.sh: autoreadme service is now webhooks (#2396) --- maintenance.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/maintenance.sh b/maintenance.sh index 89cd8c5..bbd966f 100644 --- a/maintenance.sh +++ b/maintenance.sh @@ -44,15 +44,25 @@ function git_pull_and_update_cron_and_restart_services_if_needed() # Autoreadme pushd tools/readme_generator >/dev/null - modified_after_service_start="$(find *.py translations/ templates/ -newermt "$(systemctl show --property=ActiveEnterTimestamp autoreadme | cut -d= -f2 | cut -d' ' -f2-3)")" + modified_after_service_start="$(find *.py translations/ templates/ -newermt "$(systemctl show --property=ActiveEnterTimestamp webhooks | cut -d= -f2 | cut -d' ' -f2-3)")" if [ -n "$modified_after_service_start" ] then - systemctl restart autoreadme + systemctl restart webhooks sleep 3 fi popd >/dev/null - systemctl --quiet is-active autoreadme || sendxmpppy "[autoreadme] Uhoh, failed to (re)start the autoreadme service?" + # Autoreadme + pushd tools/webhooks >/dev/null + modified_after_service_start="$(find *.py -newermt "$(systemctl show --property=ActiveEnterTimestamp webhooks | cut -d= -f2 | cut -d' ' -f2-3)")" + if [ -n "$modified_after_service_start" ] + then + systemctl restart webhooks + sleep 3 + fi + popd >/dev/null + + systemctl --quiet is-active webhooks || sendxmpppy "[autoreadme] Uhoh, failed to (re)start the autoreadme service?" } function rebuild_catalog()