From d27eede4c38938452fb6549ed974ba72b44cf5b3 Mon Sep 17 00:00:00 2001 From: Alecander Graf Date: Sun, 8 Dec 2019 20:33:17 +0100 Subject: [PATCH] Add DROPBOX_SKIP_UPDATE documentation --- README.md | 4 ++++ docker-entrypoint.sh | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9583075..1a122fe 100644 --- a/README.md +++ b/README.md @@ -88,6 +88,10 @@ files. Defaults to `1000`. If set, runs Dropbox with a custom user id. This must matching the group id of the owner of the mounted files. Defaults to `1000`. +- `DROPBOX_SKIP_UPDATE` +If set to `true`, skips updating the Dropbox app on container startup. _Note:_ This is not very reliable +because the dropbox daemon will try to update itself even if this is set to `true`. + ### Exposed Volumes - `/opt/dropbox/Dropbox` diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 194fd98..3afa504 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -34,8 +34,8 @@ chmod 755 /opt/dropbox/Dropbox [ ! -e "/opt/dropbox/.dropbox/unlink.db" ] || rm /opt/dropbox/.dropbox/unlink.db [ ! -e "/opt/dropbox/.dropbox/dropbox.pid" ] || rm /opt/dropbox/.dropbox/dropbox.pid -# Update Dropbox to latest version unless DBOX_SKIP_UPDATE is set -if [[ -z "$DBOX_SKIP_UPDATE" ]]; then +# Update Dropbox to latest version unless DROPBOX_SKIP_UPDATE is set +if [[ -z "$DROPBOX_SKIP_UPDATE" ]]; then echo "Checking for latest Dropbox version..." sleep 1 @@ -60,6 +60,8 @@ if [[ -z "$DBOX_SKIP_UPDATE" ]]; then rm -rf /opt/dropbox/bin/* mv $tmpdir/.dropbox-dist/* /opt/dropbox/bin/ rm -rf $tmpdir + find /opt/dropbox -type f -name "*.so" -exec chmod a+rx {} \; + echo "Dropbox updated to v$Latest" else echo "Dropbox is up-to-date"