Skip to content

Commit

Permalink
Add DROPBOX_SKIP_UPDATE documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
otherguy committed Dec 8, 2019
1 parent aa02448 commit d27eede
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
6 changes: 4 additions & 2 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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"
Expand Down

0 comments on commit d27eede

Please sign in to comment.