Wait for user confirmation infinitely

Hello!
I’m trying to make Download_Enter script which may wait for user confirmation infinitely (months, years). And still able to acquire actual version of artifact from hosted.mender.io
How can I implement this using StateScriptRetryTimeoutSeconds, or should I use mender client API to fetch available updates (versions) periodically?

As far as I know, it’s not possible with built-in features. While you can wait indefinitely by setting StateScriptRetryTimeoutSeconds very high, you can not at the same time get update info from the server.

I think you can get the info using manual API calls though. Get the JWT token and server from the client API first, and then use that to call the deployments API on the server. Care must be taken to submit the same parameters as the client though. Make sure to inspect the documentation carefully.

There is a ticket to improve this on the client side by providing a local API which will tell you exactly what is about to be downloaded, and which allows you some control over it as well. But it has not been implemented yet, and I’m unsure if/when it will be scheduled.