Skip to main content
4 of 4
added 15 characters in body
slm
  • 379.7k
  • 127
  • 793
  • 897

Here is my solution for Linux distributions using Upstart 1.4 and higher.

Save the contents below into a configuration file under /etc/init, for example: /etc/init/db_user.conf:

# Dropbox upstart script for user db_user, db_user can be replaced by anything you like.

description "Dropbox db_user"
author "myth384"

start on runlevel [2345]
stop on runlevel [!2345]

respawn

setuid db_user
# The next two lines are optional. I use these to be able to share the 
#   Dropbox using Samba. Within group shareusers are all Samba users.
# setgid shareusers
# umask 0002

# The next line is necessary to be able to synchronise files with non-ASCII characters.

env LANG="en_US.UTF-8"     
exec /home/db_user/.dropbox-dist/dropbox

To start up the daemon without rebooting:

sudo start db_user

NOTE: By uncommenting the setgid line it is not necessary to set the setgid flag on the .dropbox.cache folder as indicated by other sources on the internet.

Alain
  • 171
  • 1
  • 1
  • 5