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:
parent
e26adedbdb
commit
0c7ef56635
4 changed files with 10 additions and 8 deletions
|
@ -111,7 +111,6 @@ function create_variant() {
|
|||
s/%%MEMCACHED_VERSION%%/'"${pecl_versions[memcached]}"'/g;
|
||||
s/%%REDIS_VERSION%%/'"${pecl_versions[redis]}"'/g;
|
||||
s/%%IMAGICK_VERSION%%/'"${pecl_versions[imagick]}"'/g;
|
||||
s/%%CRONTAB_INT%%/'"$crontabInt"'/g;
|
||||
' "$dir/Dockerfile"
|
||||
|
||||
case "$phpVersion" in
|
||||
|
@ -132,6 +131,10 @@ function create_variant() {
|
|||
for name in entrypoint cron; do
|
||||
cp "docker-$name.sh" "$dir/$name.sh"
|
||||
done
|
||||
# Replace the variable.
|
||||
sed -ri -e '
|
||||
s/%%CRONTAB_INT%%/'"$crontabInt"'/g;
|
||||
' "$dir/cron.sh"
|
||||
|
||||
# Copy the upgrade.exclude
|
||||
cp upgrade.exclude "$dir/"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue