diff --git a/contrib/docker/entrypoint.sh b/contrib/docker/entrypoint.sh index 8eb52948..f75f937d 100755 --- a/contrib/docker/entrypoint.sh +++ b/contrib/docker/entrypoint.sh @@ -118,6 +118,13 @@ if [ -n "${ONEDRIVE_SINGLE_DIRECTORY:=""}" ]; then ARGS=(--single-directory \"${ONEDRIVE_SINGLE_DIRECTORY}\" ${ARGS[@]}) fi +# Tell client run in dry-run mode +if [ "${ONEDRIVE_DRYRUN:=0}" == "1" ]; then + echo "# We are running in dry-run mode" + echo "# Adding --dry-run" + ARGS=(--dry-run ${ARGS[@]}) +fi + if [ ${#} -gt 0 ]; then ARGS=("${@}") fi diff --git a/docs/docker.md b/docs/docker.md index b5253c36..b1995229 100644 --- a/docs/docker.md +++ b/docs/docker.md @@ -274,6 +274,7 @@ docker run $firstRun --restart unless-stopped --name onedrive -v onedrive_conf:/ | ONEDRIVE_AUTHRESPONSE | Controls "--auth-response" option. Default is "" | See [here](https://github.com/abraunegg/onedrive/blob/master/docs/usage.md#authorize-the-application-with-your-onedrive-account) | | ONEDRIVE_DISPLAY_CONFIG | Controls "--display-running-config" switch on onedrive sync. Default is 0 | 1 | | ONEDRIVE_SINGLE_DIRECTORY | Controls "--single-directory" option. Default = "" | "mydir" | +| ONEDRIVE_DRYRUN | Controls "--dry-run" option. Default is 0 | 1 | ### Environment Variables Usage Examples **Verbose Output:** diff --git a/docs/podman.md b/docs/podman.md index b71b6ec5..4f3474f3 100644 --- a/docs/podman.md +++ b/docs/podman.md @@ -294,6 +294,7 @@ podman run -it --name onedrive_work --user "${ONEDRIVE_UID}:${ONEDRIVE_GID}" \ | ONEDRIVE_AUTHRESPONSE | Controls "--auth-response" option. Default is "" | See [here](https://github.com/abraunegg/onedrive/blob/master/docs/usage.md#authorize-the-application-with-your-onedrive-account) | | ONEDRIVE_DISPLAY_CONFIG | Controls "--display-running-config" switch on onedrive sync. Default is 0 | 1 | | ONEDRIVE_SINGLE_DIRECTORY | Controls "--single-directory" option. Default = "" | "mydir" | +| ONEDRIVE_DRYRUN | Controls "--dry-run" option. Default is 0 | 1 | ### Environment Variables Usage Examples **Verbose Output:**