Skip to content

Commit

Permalink
✨ Add preview pre-generate
Browse files Browse the repository at this point in the history
  • Loading branch information
llaumgui committed Sep 20, 2024
1 parent ad81b5f commit 9c6bb89
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
11 changes: 11 additions & 0 deletions 8.3-nextcloud/cron/cron_preview.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

if [ -d /var/www/apps/previewgenerator ]; then
if [ -z "${HEALTHCHECKS_PREVIEW_URL}" ]; then
php -f /var/www/occ preview:pre-generate
else
curl -fsS -m 10 --retry 5 -o /dev/null ${HEALTHCHECKS_NC_URL}/start && \
php -f /var/www/occ preview:pre-generate && \
curl -fsS -m 10 --retry 5 -o /dev/null ${HEALTHCHECKS_NC_URL}
fi
fi
5 changes: 3 additions & 2 deletions 8.3-nextcloud/cron/www-data
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
*/5 * * * * /cron_nextcloud.sh
5 4 * * * /cron_ext_update.sh
*/5 * * * * /cron_nextcloud.sh
*/10 * * * * /cron_preview.sh
5 4 * * * /cron_ext_update.sh

0 comments on commit 9c6bb89

Please sign in to comment.