Dropbox pozwała trzymać pliki w chmurze. Jak tego używać na OpenWRT?
Wymagania wstępne
1 MB wolnej przestrzeni na extroot albo flash-u.
instalacja pakietów oraz skryptu
root@lokaj:~/svn$ opkg update root@lokaj:~/svn$ opkg install bash curl coreutils-stat
Ściągamy skrypt:
root@lokaj:~$ curl -k https://raw.github.com/andreafabrizi/Dropbox-Uploader/master/dropbox_uploader.sh > dropbox_uploader.sh % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 22073 100 22073 0 0 27451 0 --:--:-- --:--:-- --:--:-- 32652 root@lokaj:~$ chmod 755 dropbox_uploader.sh
Włączamy akceptację certyfikatów:
root@lokaj:~$ sed -i 's/#CURL_ACCEPT_CERTIFICATES/CURL_ACCEPT_CERTIFICATES/' dropbox_uploader.sh
Dodanie nowej aplikacji na dropboxie
Wchodzimy na stronę https://www.dropbox.com/developers/apply?cont=/developers/apps, akceptujemy warunki licencji i tworzymy nową aplikację.
Uruchamiamy skrypt
root@lokaj:~$ ./dropbox_uploader.sh This is the first time you run this script. Please open this URL from your Browser, and access using your account: -> https://www2.dropbox.com/developers/apps If you haven't already done, click "Create an App" and fill in the form with the following data: App name: MyUploaderXXXXX Description: What do you want... Access level: App folder or Full Dropbox Now, click on the "Create" button. When your new App is successfully created, please type the App Key, App Secret and the Access level: # App key: XXXXXXXXX # App secret: XXXXXXXX # Access level you have chosen, App folder or Full Dropbox [a/f]: f > App key is XXXXXXX, App secret is XXXXXXX and Access level is Full Dropbox, it's ok? [y/n]y > Token request... OK Please visit this URL from your Browser, and allow Dropbox Uploader to access your DropBox account: --> https://www2.dropbox.com/1/oauth/authorize?oauth_token=XXXXXX Press enter when done... > Access Token request... OK Setup completed!
Testy
root@lokaj:~$ ./dropbox_uploader.sh list > Listing "/"... DONE [D] Camera Uploads [D] ebooks [D] ebooks_IT [F] Getting Started.pdf [D] Linux [D] Photos [D] Public