1
0
Fork 0

maintenance.sh: autoreadme service is now webhooks (#2396)

This commit is contained in:
Alexandre Aubin 2024-06-08 19:19:19 +02:00 committed by GitHub
parent 6f8bb1ca25
commit 133ed9811a

View file

@ -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()