Skip to content

Instantly share code, notes, and snippets.

@gilyes
Forked from jsturgis/dropbox.service.md
Last active June 16, 2016 06:14
Show Gist options
  • Save gilyes/dc30a605d7bc3eeff356a9ca9beac057 to your computer and use it in GitHub Desktop.
Save gilyes/dc30a605d7bc3eeff356a9ca9beac057 to your computer and use it in GitHub Desktop.
dropbox systemd

Install Dropbox and Python script. Symlink Python script to /usr/local/bin/dropbox and make it executable.

#/etc/systemd/system/dropbox.service

[Unit]
Description=Dropbox Service
After=network.target

[Service]
ExecStart=/bin/sh -c '/usr/local/bin/dropbox start'
ExecStop=/bin/sh -c '/usr/local/bin/dropbox stop'
PIDFile=${HOME}/.dropbox/dropbox.pid
User=user
Group=user
Type=forking
Restart=on-failure
RestartSec=5
StartLimitInterval=60s
StartLimitBurst=3

[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment