diff --git a/README.md b/README.md index b99aa76..0c2192e 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,7 @@ OWNCLOUD_APPS_DISABLE OWNCLOUD_APPS_ENABLE ${OWNCLOUD_APPS_INSTALL} OWNCLOUD_APPS_INSTALL OWNCLOUD_APPS_UNINSTALL +OWNCLOUD_BACKGROUND_MODE cron OWNCLOUD_BLACKLISTED_FILES OWNCLOUD_CACHE_CHUNK_GC_TTL OWNCLOUD_CACHE_PATH diff --git a/rootfs/etc/entrypoint.d/10-base.sh b/rootfs/etc/entrypoint.d/10-base.sh index 1847ca1..f420069 100755 --- a/rootfs/etc/entrypoint.d/10-base.sh +++ b/rootfs/etc/entrypoint.d/10-base.sh @@ -60,4 +60,7 @@ declare -x OWNCLOUD_MAINTENANCE declare -x OWNCLOUD_SINGLEUSER [[ -z "${OWNCLOUD_SINGLEUSER}" ]] && OWNCLOUD_SINGLEUSER="" +declare -x OWNCLOUD_BACKGROUND_MODE +[[ -z "${OWNCLOUD_BACKGROUND_MODE}" ]] && OWNCLOUD_BACKGROUND_MODE="cron" + true diff --git a/rootfs/etc/owncloud.d/55-cron.sh b/rootfs/etc/owncloud.d/55-cron.sh index 352062a..d84d6c1 100755 --- a/rootfs/etc/owncloud.d/55-cron.sh +++ b/rootfs/etc/owncloud.d/55-cron.sh @@ -1,7 +1,19 @@ #!/usr/bin/env bash -echo "Enabling background cron..." -occ background:cron +case "${OWNCLOUD_BACKGROUND_MODE}" in + "ajax") + echo "Enabling ajax background..." + occ background:ajax + ;; + "cron") + echo "Enabling cron background..." + occ background:cron + ;; + "webcron") + echo "Enabling webcron background..." + occ background:webcron + ;; +esac if [[ ${OWNCLOUD_CROND_ENABLED} == "true" ]] then