1
0
Fork 0
mirror of https://github.com/YunoHost/apps.git synced 2024-09-03 20:06:07 +02:00

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 cb6b4b3a1c
commit 53ec121ac7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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