nextcloud / nextcloud/desktop

Check current sync status from command line

Open
#6,345 4 comments 4 reactions 0 assignees View on GitHub
feature: :arrows_counterclockwise: sync engine feature: :white_square_button: nextcloudcmd
Dominant language
C++
Stars
3.9k
Forks
1k
Avg merge
1d 17h
Merged PRs (30d)
123

Description

### Feature description
Hi all,

I am looking for a way to determine the current state of the nextcloud client (mainly: "syncing.." vs "all synced") in a bash script.
I use that to wait for syncing to end and then automatically trigger shutdown.
Dropbox, which I used for a long time, has a python script command for that: $ dropbox status
That just returns a string, that can be captured and interpreted.

If there isn't such a functionality in the nextcloud client (and my searches indicate nothing useful), I would like to give it a try.
For my use case, it could mean to just perform a hacky lookup of some log files (I saw I can enable logging to /tmp/Nextcloud-logdir/) or anything similar.
So has anyone, who is more into the code, an idea how to cleverly approach this for now?

Also, I would suggest to consider such a utility a super enhancement for this project. If a simple approach could be found for now, I would like to look into integrating this to the project in a smoother way.

Thx in advance for any suggestions!

-------------------

The information I want to obtain seems to be stored in [src/common/syncfilestatus.h](https://github.com/nextcloud/desktop/blob/master/src/common/syncfilestatus.h)

What happened to `nextcloudcmd`? Is [src/cmd](https://github.com/nextcloud/desktop/tree/master/src/cmd) working or not? Sorry, but I cannot find up-to-date information about it. Thx!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.