You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Good news. I came up with a quick solution! (Linux only)
I just borrowed some code from the syncstate nautilus-extension, which connects to a socket that communicates with the nextcloud client.
With this approach, all information that the socket provides (see here for all the possible requests) can be implemented.
I mirrored the behavior of the Dropbox command-line tool that is to print Up to date or Syncing.. whenever called. I decided to do so (for now), because I used Dropbox before and can reuse all my personal scripts this way (e.g. delaying shutdown when some syncing has not yet finished).
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
What happened to
nextcloudcmd
? Is src/cmd working or not? Sorry, but I cannot find up-to-date information about it. Thx!The text was updated successfully, but these errors were encountered: