feat: optionally use standalone mode for syncing using Docker container (#3018)

* feat: optionally use standalone mode for syncing using Docker container

* Update podman.md
* Update podman.md

---------

Co-authored-by: abraunegg <alex.braunegg@gmail.com>
This commit is contained in:
Pieter Scheffers 2024-11-28 20:29:30 +01:00 committed by GitHub
commit c7f1b7f407
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 14 additions and 1 deletions

View file

@ -34,9 +34,20 @@ else
fi
# Default parameters
ARGS=(--monitor --confdir /onedrive/conf --syncdir /onedrive/data)
ARGS=(--confdir /onedrive/conf --syncdir /onedrive/data)
echo "# Base Args: ${ARGS}"
# Tell client to use Standalone Mode, based on an environment variable. Otherwise Monitor Mode is used.
if [ "${ONEDRIVE_SYNC_ONCE:=0}" == "1" ]; then
echo "# We run in Standalone Mode"
echo "# Adding --sync"
ARGS=(--sync ${ARGS[@]})
else
echo "# We run in Monitor Mode"
echo "# Adding --monitor"
ARGS=(--monitor ${ARGS[@]})
fi
# Make Verbose output optional, based on an environment variable
if [ "${ONEDRIVE_VERBOSE:=0}" == "1" ]; then
echo "# We are being verbose"