Addendum to Dropbox SFTP Access

Here’s a little update on my post about accessing Dropbox by SFTP on a unix host. For the most part the setup just works. I connect directly from Sublime Text over SFTP and save as I work. Everything is uploaded to Dropbox almost instantly.

The major gotcha is that twice in the past month the Dropbox service has stopped running. I cobbled together a shell script that checks to see if the service is dead and starts it if it needs to. It’s pretty self explanatory.1

Here’s the script:

if [ "$(python /home/macdrifter/bin/ status)" = "Dropbox isn't running!" ]; then start

This runs every 5 minutes on my host:

*/5 * * * * sh

  1. I’m using the full path to the file because I’m too lazy to figure out what PATH my cron jobs are run with. I just know they have access to python. Good enough. ↩︎