mirror of
https://github.com/nextcloud/docker.git
synced 2025-04-21 03:06:08 +02:00
(Cron) Preview Generator support
Allow the user to enable and configure a cron entry for the NC Preview Generator. To do so, add CRON_PREVIEW={hour} (allowed values for hour are 0-23 since cron uses 24H system) in the startup environment parameters for the cron service container. User must install the Preview Generator app ahead of time from the app store. Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
This commit is contained in:
parent
8df9b2617e
commit
24f485d38b
1 changed files with 7 additions and 0 deletions
|
@ -1,4 +1,11 @@
|
|||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
# Set-up cron entry for previewgenerator (https://apps.nextcloud.com/apps/previewgenerator)
|
||||
# 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
|
||||
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
|
||||
fi
|
||||
|
||||
exec busybox crond -f -l 0 -L /dev/stdout
|
||||
|
|
Loading…
Add table
Reference in a new issue