mirror of
https://github.com/abraunegg/onedrive
synced 2024-05-10 01:36:39 +02:00
Add Docker environment variable to allow --logout for re-authentication (#1187)
* Add Docker environment variable to allow --logout for re-authentication
This commit is contained in:
parent
ba94b92d8a
commit
3341e30ffa
|
@ -58,6 +58,13 @@ if [ "${ONEDRIVE_DOWNLOADONLY:=0}" == "1" ]; then
|
|||
ARGS=(--download-only ${ARGS[@]})
|
||||
fi
|
||||
|
||||
# Tell client to logout based on environment variable
|
||||
if [ "${ONEDRIVE_LOGOUT:=0}" == "1" ]; then
|
||||
echo "# We are logging out to perform a reauthentication"
|
||||
ARGS=(--logout ${ARGS[@]})
|
||||
fi
|
||||
|
||||
|
||||
if [ ${#} -gt 0 ]; then
|
||||
ARGS=("${@}")
|
||||
fi
|
||||
|
|
|
@ -155,6 +155,7 @@ docker run $firstRun --restart unless-stopped --name onedrive -v onedrive_conf:/
|
|||
| <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 |
|
||||
| <B>ONEDRIVE_LOGOUT</B> | Controls "--logout" switch. Default is 0 | 1 |
|
||||
|
||||
### Usage Examples
|
||||
**Verbose Output:**
|
||||
|
@ -174,6 +175,11 @@ docker container run -e ONEDRIVE_RESYNC=1 -v onedrive_conf:/onedrive/conf -v "${
|
|||
docker container run -e ONEDRIVE_RESYNC=1 -e ONEDRIVE_VERBOSE=1 -v onedrive_conf:/onedrive/conf -v "${onedriveDir}:/onedrive/data" driveone/onedrive:latest
|
||||
```
|
||||
|
||||
**Perform a --logout and re-authenticate:**
|
||||
```bash
|
||||
docker container run -e ONEDRIVE_LOGOUT=1 -v onedrive_conf:/onedrive/conf -v "${onedriveDir}:/onedrive/data" driveone/onedrive:latest
|
||||
```
|
||||
|
||||
## Build instructions
|
||||
### Build Environment Requirements
|
||||
* Build environment must have at least 1GB of memory & 2GB swap space
|
||||
|
|
Loading…
Reference in a new issue