Skip to content

Commit

Permalink
Make background job configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
tboerger committed Oct 10, 2018
1 parent 383d66a commit a396961
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions rootfs/etc/entrypoint.d/10-base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
16 changes: 14 additions & 2 deletions rootfs/etc/owncloud.d/55-cron.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit a396961

Please sign in to comment.