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
parent fe86dd1809
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

View file

@ -154,6 +154,7 @@ docker run $firstRun --restart unless-stopped --name onedrive -v onedrive_conf:/
| <B>ONEDRIVE_DEBUG</B> | Controls "--verbose --verbose" switch on onedrive sync. Default is 0 | 1 |
| <B>ONEDRIVE_DEBUG_HTTPS</B> | Controls "--debug-https" switch on onedrive sync. Default is 0 | 1 |
| <B>ONEDRIVE_RESYNC</B> | Controls "--resync" switch on onedrive sync. Default is 0 | 1 |
| <B>ONEDRIVE_DOWNLOADONLY</B> | Controls "--download-only" switch on onedrive sync. Default is 0 | 1 |
### Usage Examples
**Verbose Output:**