Difference between revisions of "Talk:Dropbox"

From ArchWiki
Jump to: navigation, search
(connecting... problem)
(connecting... problem)
Line 2: Line 2:
  
 
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.
 
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.
 +
 +
{{bc|<nowiki>
 +
#!/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
 +
</nowiki>}}
 +
 +
Update 09/01/13 Added script until this issue is actually resolved by Dropbox.
  
 
-- [[User:Donniezazen|Donniezazen]], August 31st 2013.
 
-- [[User:Donniezazen|Donniezazen]], August 31st 2013.

Revision as of 19:16, 1 September 2013

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.