Added env variable to enable download-only mode in Docker (#1113)

* Added ONEDRIVE_DOWNLOADONLY env switch to entrypoint.sh for Docker use
* Update entrypoint.sh
This commit is contained in:
Richard Moore 2020-10-26 14:49:25 -04:00 committed by GitHub
commit e81de988ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View file

@ -52,6 +52,12 @@ if [ "${ONEDRIVE_RESYNC:=0}" == "1" ]; then
ARGS=(--resync ${ARGS[@]})
fi
# Tell client to sync in download-only mode based on environment variable
if [ "${ONEDRIVE_DOWNLOADONLY:=0}" == "1" ]; then
echo "# We are synchronizing in download-only mode"
ARGS=(--download-only ${ARGS[@]})
fi
if [ ${#} -gt 0 ]; then
ARGS=("${@}")
fi