mirror of
https://github.com/abraunegg/onedrive
synced 2024-05-10 17:56:44 +02:00
Docker - Make --verbose optional based on environment variable (#651)
* Add environment variables section into relevant document * Update entrypoint.sh to support --verbose via environment variable
This commit is contained in:
parent
42d8c454e2
commit
230be5a23d
|
@ -26,7 +26,15 @@ fi
|
|||
chown "${oduser}:${odgroup}" /onedrive/ /onedrive/conf
|
||||
|
||||
# Default parameters
|
||||
ARGS=(--monitor --verbose --confdir /onedrive/conf --syncdir /onedrive/data)
|
||||
ARGS=(--monitor --confdir /onedrive/conf --syncdir /onedrive/data)
|
||||
|
||||
#Make Verbose output optional, based on an environment variable
|
||||
# default behaviour is verbose (to continue to behave as before)
|
||||
if ! [ "${ONEDRIVE_VERBOSE:=1}" == "0" ]; then
|
||||
echo "# We are being verbose"
|
||||
echo "# set ONEDRIVE_VERBOSE environment to 0 (Zero) to be less chatty"
|
||||
ARGS=(--verbose ${ARGS[@]})
|
||||
fi
|
||||
|
||||
if [ ${#} -gt 0 ]; then
|
||||
ARGS=("${@}")
|
||||
|
|
|
@ -116,6 +116,16 @@ docker inspect onedrive > /dev/null && docker rm -f onedrive
|
|||
docker run $firstRun --restart unless-stopped --name onedrive -v onedrive_conf:/onedrive/conf -v "${onedriveDir}:/onedrive/data" driveone/onedrive
|
||||
```
|
||||
|
||||
|
||||
## Environment Variables
|
||||
|
||||
|
||||
| Variable | Purpose | Sample Value |
|
||||
| ---------------- | --------------------------------------------------- |:-------------:|
|
||||
| <B>ONEDRIVE_UID</B> | UserID (UID) to run as | 1000 |
|
||||
| <B>ONEDRIVE_GID</B> | GroupID (GID) to run as | 1000 |
|
||||
| <B>ONEDRIVE_VERBOSE</B> | Controls "verbose" switch on onedrive sync. Default (i.e. not set or non-zero value) behaviour is to continue to be verbose as before | 0 |
|
||||
|
||||
## Build instructions
|
||||
You can also build your own image instead of pulling the one from dockerhub:
|
||||
```bash
|
||||
|
|
Loading…
Reference in a new issue