After having shown a simple way on how to create a “birdwatching station” using a RaspberryPi (see this post, in italian) i am now presenting you how to send images to Google Drive.
What you need:
- a Google account
- gdrive tool, download it from this address and run it at least one time
- download loop_analisi_new.sh from here or from GitHub and save it in the same directory containing loop_analisi.sh
At this point you have to:
- edit file loop_analisi_new.sh and set the correct value for: GDRIVEPATH, GDRIVECONF, GDRIVECONT, PORTASSH, UTENTESSH, SERVERSSH
- in file /etc/rc.local replace loop_analisi.sh with loop_analisi_new.sh
- reboot you system
The job is now finished!
As you can see looking at the code of loop_analisi_new.sh the new script will attempt to get info about Google Drive storage and if it fails it will fallback to a standard sftp upload to the server configured in the first part of the script.