Do not replace built-in scripts
When the user mounts /cron-scripts in the container, this replaced the built-in scripts. The built-in scripts are now shipped in /cron-scripts-builtin now.
This commit is contained in:
parent
d13a18876a
commit
ff71477632
4 changed files with 13 additions and 9 deletions
|
@ -10,7 +10,7 @@ ENV NEXTCLOUD_EXEC_SHELL=bash
|
|||
ENV NEXTCLOUD_EXEC_SHELL_ARGS=-c
|
||||
|
||||
COPY scripts/*.sh /
|
||||
COPY scripts/cron-scripts /cron-scripts
|
||||
COPY scripts/cron-scripts-builtin /cron-scripts-builtin
|
||||
|
||||
ENTRYPOINT ["tini", "--", "/entrypoint.sh"]
|
||||
|
||||
|
|
|
@ -148,9 +148,8 @@ in addition to the default `cron.php` task. To add your custom tasks, follow the
|
|||
php -f /var/www/html/cron.php
|
||||
```
|
||||
|
||||
2. Mount this shell script inside the `/cron-scripts` directory. You may also choose to *replace*
|
||||
this directory, but bear in mind that you will not be running the built-in cron tasks in that
|
||||
case. Here's an example if you're using `docker-compose.yml`:
|
||||
2. Mount this shell script inside the `/cron-scripts` directory. Here's an example if you're using
|
||||
`docker-compose.yml`:
|
||||
|
||||
```yml
|
||||
services:
|
||||
|
@ -164,8 +163,8 @@ in addition to the default `cron.php` task. To add your custom tasks, follow the
|
|||
interval.
|
||||
|
||||
Multiple scripts are supported. The container will search for all `*.sh` files inside the
|
||||
`/cron-scripts` directory. To make supporting multiple scripts easier, you can also map a directory
|
||||
on the host to the `/cron-scripts` directory in the container:
|
||||
`/cron-scripts` directory inside the container. To make supporting multiple scripts easier, you can
|
||||
also map a directory on the host to the `/cron-scripts` directory in the container:
|
||||
|
||||
```yml
|
||||
services:
|
||||
|
|
|
@ -28,8 +28,13 @@ run_scripts_in_dir() {
|
|||
}
|
||||
|
||||
# Loop through all shell scripts and execute the contents of those scripts in the Nextcloud
|
||||
# container. It's done this way so that the user may mount more scripts to be executed in addition
|
||||
# to the default ones.
|
||||
# container.
|
||||
run_scripts_in_dir /cron-scripts-builtin
|
||||
|
||||
# If the user has mounted their own scripts, execute those as well. These are optional. It's done
|
||||
# this way so that the user may mount more scripts to be executed in addition to the default ones.
|
||||
if [[ -d /cron-scripts ]]; then
|
||||
run_scripts_in_dir /cron-scripts
|
||||
fi
|
||||
|
||||
echo "> Done"
|
||||
|
|
Loading…
Reference in a new issue