Autostart Seafile Client CLI on Lubuntu system startup (before user login)

654 views
Skip to first unread message

Jip de Beer

unread,
Feb 11, 2015, 10:45:17 AM2/11/15
to sea...@googlegroups.com
Hi,

I have installed the Seafile Client for Linux 4.0.6 64bit on my Ubuntu machine. The GUI client comes with the seaf-cli binary as well. It is located at /usr/bin/seaf-cli.

I've tried this method for auto starting the cli daemon: http://www.yawc.de/2015/01/seafile-cli-autostart/

It's not working for me.

I want to auto-start the cli client every time my machine boots up (so before the user logs on).

The thing is, I'm also running Seafile server on the same machine. The server does automatically start as per the Seafile instructions on http://manual.seafile.com/deploy/start_Seafile_at_system_bootup.html. I want to automatically sync a library to an externally connected USB drive (as a portable backup so to speak) with the Seafile client.

Do you think it could be going wrong because I'm trying to run the client before the server is finished starting up? I've tried to add 'sleep 10' before the su -c "$DAEMON start" - $USER statement. Doesn't help either. I've also changed the su -c "$DAEMON start" - $USER statement to su -c "$DAEMON start" - $USER >> /path/to/logfile.txt. In the log I can see that the client starts without errors... But after I login the 'seaf-cli status' statement gives me many errors, indicating that the client isn't actually running.

Any idea how I can fix this issue?

Jip de Beer

unread,
Feb 15, 2015, 10:12:48 AM2/15/15
to sea...@googlegroups.com
It seems the problem was with auto-mounting the external drive. I've set up auto mounting as follows.

In the Lubuntu file manager I went to Edit -> Preferences -> Volume Management -> Check: Mount mountaable volumes automatically on program startup and Check: Mount removable media automatically when they are inserted.

This didn't work... But the output of seafile-cli suggested that seaf-cli started without problems.

The right way to auto mount the volume was with fstab. So syncing now works even before the user logs in.

Op woensdag 11 februari 2015 16:45:17 UTC+1 schreef Jip de Beer:

Jip de Beer

unread,
Feb 15, 2015, 6:08:35 PM2/15/15
to sea...@googlegroups.com

Actually it turns out the problem was of a different nature!

During configuration I set up the Seafile client to use the external drive as its default location for syncing new libraries. Looked like a convenient option to me for my use case. However, I wasn’t aware that the Seafile client also stores important data in the .seafile-data directory on this default path…. So when my external drive was not attached the seafile client was actually missing a lot of the necessary files to operate.

I’ve changed the default path to an internal disk, copied over the existing data, and now the seafile client will start without problems when the external drive is not available.


Op zondag 15 februari 2015 16:12:48 UTC+1 schreef Jip de Beer:
Reply all
Reply to author
Forward
0 new messages