How to start / stop Dropbox at a specific time

7,082

Dropbox is not started at boot time, there is no init.d script to do it. The daemon is started at login for each user and the binaty is located in ~/.dropbox-dist/dropbox.

To start up the daemon you need to use the command

start-stop-daemon -b -o -c user -S -u user -x ~/.dropbox-dist/dropbox

and to stop it you need to use

start-stop-daemon -o -c user -K -u user -x ~/.dropbox-dist/dropbox

Where user is your username.

Source for this information is at http://ubuntuserverguide.com/2012/06/how-to-install-and-configure-dropbox-on-ubuntu-server-12-04.html. There is also a nice startup init.d script there, you might consider following that guide.

Share:
7,082

Related videos on Youtube

svandragt
Author by

svandragt

Senior Web Engineer at Human Made, maker of Altis DXP

Updated on September 18, 2022

Comments

  • svandragt
    svandragt over 1 year

    I have setup a service on my Ubuntu 10.04.4 LTS server, which works when started and stopped manually using sudo service <service> start etc.

    However I would like to have the service (dropbox btw.) only running for a few hours each day, as the service uses a lot of memory.

    I have added the following to my cron using crontab -e, but it doesn't work as expected:

    1 5 * * * /etc/init.d/dropbox start
    1 6 * * * /etc/init.d/dropbox stop
    

    This returns the following message start-stop-daemon: not found. Am I doing it wrong and if so how do you start / stop a service at a specific time?

  • svandragt
    svandragt almost 12 years
    I was already using the init.d script from your link. However I had to add the following line above line 3 (DROPBOX_USERS line): PATH=${PATH}:/sbin to make the cron daemon find the start-stop-daemon.
  • Bruno Pereira
    Bruno Pereira almost 12 years
    Perfect, you can also add that an answer and accept it as the correct one since you found what was the issue with the scrip.