mirror of
https://github.com/abraunegg/onedrive
synced 2024-05-10 01:36:39 +02:00
Make verbose logging output optional on Docker (#638)
* Make "--verbose" optional based on ONEDRIVE_VERBOSE environment variable. Verbose will continue to be the default if ONEDRIVE_VERBOSE is set to *anything* other than 0 (zero), or if it's not set at all.
This commit is contained in:
parent
8ca71142df
commit
e8c3c236ef
|
@ -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=("${@}")
|
||||
|
|
|
@ -101,6 +101,14 @@ Or you can map your own config folder to config volume (copy stuffs from docker
|
|||
|
||||
The detailed document for the config can be found here: [additional-configuration](https://github.com/abraunegg/onedrive#additional-configuration)
|
||||
|
||||
## Environment Variables
|
||||
|
||||
| Variable | Purpose | Sample Value |
|
||||
| ---------------- | --------------------------------------------------- |:-------------:|
|
||||
| **ONEDRIVE_UID** | UserID (UID) to run as | 1000 |
|
||||
| **ONEDRIVE_GID** | GroupID (GID) to run as | 1000 |
|
||||
| **ONEDRIVE_VERBOSE** | 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 |
|
||||
|
||||
## Run or update with one script
|
||||
|
||||
If you are experienced with docker and onedrive, you can use the following script:
|
||||
|
|
Loading…
Reference in a new issue