haiwen / seafile

High performance file syncing and sharing, with also Markdown WYSIWYG editing, Wiki, file label and other knowledge management features.
http://seafile.com/
Other
12.38k stars 1.55k forks source link

seaf-cli: sync complete status, then shutdown #1983

Open Jip-Hop opened 7 years ago

Jip-Hop commented 7 years ago

I'd like to shutdown the computer after Seafile is done syncing the libraries. There doen't seem to be an easy/reliable way to check if the seaf-cli client has completed syncing. seaf-cli status outputs the following:

Seafile sync status:
# Name  Status  Progress
A   downloading x/x, xKB/s

# Name  Status
B Status    synchronized

In this case I'd have to parse the output and check if synchronized appears two times. Then I can shutdown the computer. But this is rather messy and depends on the amount of libraries synced.

Adding a new argument like this seaf-cli synchronized would solve my problem. It could output true if all libraries are synced or false if still synchronising.

Rettiwer commented 5 years ago

Also add cli to the windows client, because now I only have two options: a) to modify client, b) run virtualbox linux emulator with that seaf-cli client and share folder with windows