Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I wanted to run my Dropbox daemon automatically at start-up. I did it via terminal, that is, I (1) moved it to /etc/init.d, (2) made it executable, and (3) ran sudo update-rc.d dropbox.sh defaults. So we have

$ ll /etc/init.d/dropbox.sh 
-rwxr-xr-x 1 root root 38 Aug 16 00:18 /etc/init.d/dropbox.sh*

$ cat /etc/init.d/dropbox.sh 
#! /bin/sh
~/.dropbox-dist/dropboxd &

$ ll ~/.dropbox-dist/dropboxd
-rwxr-xr-x 1 skrd skrd 258 Jun  6 03:03 /home/skrd/.dropbox-dist/dropboxd

However, Dropbox does not run upon start up.

Note that, invoking /etc/init.d/dropbox.sh runs the dropbox daemon without hitch.

I know that Ubuntu has a GUI for this and I could easily just add the dropbox script there but I wonder why my terminal commands didn't do it? Isn't that more standard for Linux machines?

share|improve this question
add comment

1 Answer

It may be a good way if you use insserv instead of sudo update-rc.d dropbox.sh defaults.

sudo insserv

From man insserv:

insserv  is a low level tool used by update-rc.d which enables an installed sys‐
tem init script (`boot script')

If you get the command not found error, you may fix by running the following command:

sudo ln -s /usr/lib/insserv/insserv /sbin/insserv

See insserv -h for help.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.