Initiate updates in managed mode

Hi. I have a few questions about managed mode:

  1. Is there any way to determine what the managed daemon is currently doing? E.g. To see if it’s currently downloading a new artifact?
  2. While the systemd Mender service is running, is it OK to also call the mender binary in standalone mode? E.g. calling ‘mender -check-update’ explicitly. Could this potentially interfere with an already ongoing download by the managed daemon?
  3. Assuming (2) is OK, if I call ‘mender -check-update’, will the daemon automatically detect the result of this, and proceed with downloading, installing & rebooting? Or will I need to wait for the normal check every ‘Update-Poll-Interval’?

For some context, our devices are powered on/off periodically by an external microcontroller in order to preserve power. They are generally only on for a minute or two before being powered off for between 10minutes - 24 hrs+.
My initial plan is to

  1. Power device on, perform usual device actions.
  2. Check for an update via the Mender Client API
  3. If update is available:
    3.1) Send message to external microcontroller to request that power not be shut off for 10 minutes or so.
    3.2) Initiate update (via mender -check-update)
    3.3) Wait. Presumably the managed daemon will download the update, install & reboot?
  4. If no update available, shutdown.

Any feedback or suggestions are appreciated. Thanks!

You can use a Download state script to execute a script at the start and end of a Download.

Yes, this is fine. Signals intercepted while an update is in progress will just be ignored.

That should work, and is indeed the intended use case of mender -check-update.

Perfect, looks like mender -check-update and an Enter-Download state script will do exactly what I need. Thank you.