blackchestnut / blackchestnut.github.io

Developer notes about Ruby on Rails, React Native, PostgreSQL, etc.
https://kalinichev.net
4 stars 0 forks source link

Install Dropbox Client as a Service on Ubuntu 14.04 #22

Open blackchestnut opened 7 years ago

blackchestnut commented 7 years ago

Install Dropbox Client

cd ~
curl -Lo dropbox-linux-x86_64.tar.gz https://www.dropbox.com/download?plat=lnx.x86_64
sudo mkdir -p /opt/dropbox
sudo tar xzfv dropbox-linux-x86_64.tar.gz --strip 1 -C /opt/dropbox

Link Dropbox Client

/opt/dropbox/dropboxd

Visit the URL in the output (highlighted in the above example) in a web browser on your local computer.

Set Up Service Script

cd ~
sudo curl -o /etc/init.d/dropbox https://gist.githubusercontent.com/thisismitch/d0133d91452585ae2adc/raw/699e7909bdae922201b8069fde3011bbf2062048/dropbox
sudo chmod +x /etc/init.d/dropbox
sudo vim /etc/default/dropbox

Add a line that specifies that DROPBOX_USERS is equal to your system username. For example, if your username is "sammy", it should look like this:

DROPBOX_USERS="sammy"

Now Dropbox is ready to be started as a service. Run this command to start it:

sudo service dropbox start

Then run this command to configure the service to start when your server boots:

sudo update-rc.d dropbox defaults

Source https://www.digitalocean.com/community/tutorials/how-to-install-dropbox-client-as-a-service-on-ubuntu-14-04