3

I've got a systemd service file dropbox.service set up as follows:

[Unit]
Description=dropbox
After=local-fs.target network.target

[Service]
User=romeovs
ExecStart=/usr/bin/dropboxd

[Install]
WantedBy=multi-user.target

this succesfully starts the dropbox daemon if it is run any time after boot. Something seems to go wrong when I enable it to run at boot though. dropbox status just shows that dropbox is Connecting....

My guess is that the network needs to be fully up before dropbox is started. How can I force this with systemd?

1

As a quick hack:

[Unit]
Description=dropbox
After=local-fs.target network.target

[Service]
User=romeovs
ExecStartPre=sh -c 'while ! ping -c1 dropbox.com >/dev/null; do sleep 1; done'
ExecStart=/usr/bin/dropboxd

[Install]
WantedBy=multi-user.target

Should work independently of what any network manager reports.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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