sintaxi / dbox

NodeJS SDK for Dropbox API (THIS LIBRARY IS OBSOLETE!!)
514 stars 91 forks source link

fail to push when no user loged in #93

Open atoudam opened 8 years ago

atoudam commented 8 years ago

Hi

sorry if get the terminology incorrect (and if this is my stupidity rather then and issue /bug) but i am having an issue with dbox when i run the command-line version with no user loged in (System is an unattended RPI )

i have a small bash script that i run on occasion which does the command (the bash script is run from a python script )

the bash script is as below (with tokens removed) , it all works great as long as there is a user logged in via SSH if there is no user loged in then dbox it returns "[]" is this a bug? or am i making a mistake in my usage? im open to suggestions

It does however need to be stated via the python script as that first starts up the modem/internet and checks its connected etc (its a mobile low power device)

!/bin/sh

DROPBOX_ACCESS_TOKEN=xxx DROPBOX_USER_ID=xxx dbox push /home/pi

also note python script is run as root on boot and when running the bash script uses the following import subprocess proc = subprocess.Popen(["/home/pi/job.sh"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) (out, err) = proc.communicate() print "dbox output:", out time.sleep(4)