Does Balena Shutdown Send Signal

Is there a way to have a container receive the shutdown command from the Balena CLI or UI?

I looked at the Supervisor repo and it looks like the shutdown and reboot commands use dbus. My goal is to catch the shutdown command in one of our services and then communicate that to our micro co-processor which does power management for our custom PCBA.


Do You know balena masterclass?
Balena fleets consist of one or more balena services, which are based upon Docker images, containers, volumes and networks. This allows fleets to be extremely flexible, allowing services to be isolated with access only to part of the host required, as well as defining their own networking and data requirements.

This masterclass acts as an introduction to how both single service and multicontainer fleets operate, as well as demonstrating some of their most common uses and some advanced techniques.

In this masterclass, you will learn how to:

  • Build a single service
  • Persist data across fleet updates
  • Communicate between containers and the outside world
  • Run systemd inside your balenalib container
  • Reduce the image size for compiled code

For further you can have look and get more knowledge about it.