From 97193107ee292c60d5ebda9d68a7894bebc92208 Mon Sep 17 00:00:00 2001 From: Cauan Date: Sun, 24 Feb 2019 03:20:50 -0300 Subject: [PATCH] Update entrypoint.sh (#387) * Update entrypoint.sh to accept command line arguments --- entrypoint.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 144bc532..0986fb96 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -23,4 +23,12 @@ else fi chown "${oduser}:${odgroup}" /onedrive/ /onedrive/conf -exec gosu "${oduser}" /usr/local/bin/onedrive --monitor --verbose --confdir /onedrive/conf --syncdir /onedrive/data + +# Default parameters +ARGS=(--monitor --verbose --confdir /onedrive/conf --syncdir /onedrive/data) + +if [ ${#} -gt 0 ]; then + ARGS=("${@}") +fi + +exec gosu "${oduser}" /usr/local/bin/onedrive "${ARGS[@]}"