0
0
Fork 0
mirror of https://github.com/nextcloud/docker.git synced 2025-04-21 03:06:08 +02:00

Support updating CRON_PREVIEW time

Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
This commit is contained in:
Josh Richards 2023-04-18 12:03:43 -04:00 committed by GitHub
parent 24f485d38b
commit ea6c4b3366
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,7 +5,9 @@ set -eu
# Note: the user should make sure they install the app first and we could check here but it's non-fatal... # Note: the user should make sure they install the app first and we could check here but it's non-fatal...
if [ -n "${CRON_PREVIEW+x}" ]; then if [ -n "${CRON_PREVIEW+x}" ]; then
echo "Configuring Preview Generator to run at ${CRON_PREVIEW}:00 (24H system time) if /cron.sh is activated" echo "Configuring Preview Generator to run at ${CRON_PREVIEW}:00 (24H system time) if /cron.sh is activated"
echo "* ${CRON_PREVIEW} * * * /var/www/html/occ preview:pre-generate" >> /var/spool/cron/crontabs/www-data sed -n -e '/preview:pre-generate/!p' -e "\$a\* ${CRON_PREVIEW} \* \* \* /var/www/html/occ preview:pre-generate" \
/var/spool/cron/crontabs/www-data > /var/spool/cron/crontabs/www-data.tmp && \
mv /var/spool/cron/crontabs/www-data.tmp /var/spool/cron/crontabs/www-data
fi fi
exec busybox crond -f -l 0 -L /dev/stdout exec busybox crond -f -l 0 -L /dev/stdout