0
0
Fork 0
mirror of https://github.com/nextcloud/docker.git synced 2025-06-16 16:14:47 +02:00

Replace crond with a while loop.

Adding the cron command to  /var/spool/cron/crontabs/www-data assumes
that cron, and by extension the nextcloud app, is run as 'www-data'.

'crond' cannot be used with:
exec "echo \"*/%%CRONTAB_INT%% * * * * php -f /var/www/html/cron.php\" | crontab - && crond -f -l 0 -L /dev/stdout"
because that assumes the uid used matches a entry in '/etc/passwd'.

Signed-off-by: Roland Vet <vet.roland@gmail.com>
This commit is contained in:
Roland Vet 2021-04-06 12:56:35 +02:00
parent e26adedbdb
commit 0c7ef56635
4 changed files with 10 additions and 8 deletions

View file

@ -7,8 +7,7 @@ RUN set -ex; \
rsync \
; \
\
rm /var/spool/cron/crontabs/root; \
echo '*/%%CRONTAB_INT%% * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data
rm /var/spool/cron/crontabs/root
# install the PHP extensions we need
# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html