Talk:Dropbox

From ArchWiki
Revision as of 20:53, 2 September 2013 by Lahwaacz (Talk | contribs) (connecting... problem: re, closing)

Jump to: navigation, search

connecting... problem

The suggested connecting... problem's solution isn't helpful. It assumes that system connect to network after timeout seconds but on my system I have to unlock KDE Wallet before I can connect to internet. In that case any timeout is not helpful. The old script should be reposted.

#!/bin/sh

# Copyright 2008 Evenflow, Inc., 2010 Dropbox
#
# Environment script for the dropbox executable.

start_dropbox() {
PAR=$(dirname $(readlink -f $0))
OLD_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
LD_LIBRARY_PATH=$PAR:$LD_LIBRARY_PATH

TMP1=$(ps ax|grep dropbox|grep -v grep)
if [ -n "$TMP1" ]; then
        kill -9 $(pidof dropbox) >/dev/null 2>&1
fi
exec $PAR/dropbox $@ &
}

do_dropbox() {
start_dropbox >/dev/null 2>&1
while [ 1 ]; do
        sleep 5
        ERROR="$(net_test)"
        if [ -n "$ERROR" ]; then
                LAST_ERROR=1
        else
                if [ -n "$LAST_ERROR" ]; then
                # Connection seems to be up but last cycle was down
                        LAST_ERROR=""
                 start_dropbox >/dev/null 2>&1
                 fi
        fi
done
}

net_test() {
TMP1="$(ip addr |grep "inet " |grep -v "127.0.0.1")"
[ -z "$TMP1" ] && echo "error"
}

do_dropbox

Update 09/01/13 Added script until this issue is actually resolved by Dropbox.

-- Donniezazen, August 31st 2013.

This script is available in [1], which is linked from Dropbox#Dropbox_on_laptops. Closing. -- Lahwaacz (talk) 20:53, 2 September 2013 (UTC)