Hello there,
I have been trying to use the balena supervisor in order to stop and start devices at will. However, I get behavior where they are constantly restarting without any input from me. I would like to make it so that I can control when the container starts up again through the api. Is there any way to ensure that the container will stay stopped/paused until I start it up again? I have tried different restart policies in the docker compose including “no” and “unless-stopped”.
Thank you!
Hello, the Supervisor API call stop-service
(Interacting with the balena Supervisor - Balena Documentation) should stop the specified service regardless of the restart policy. Note “Rebooting the device or supervisor will cause the container to start again.” Is this perhaps causing your restarts?
There is also a start-service
API call for starting a service on the device.
I am definitely not rebooting the device, but does turning off the container reset its supervisor?
To be sure I’m answering your question correctly, can you clarify what you mean by “turning off the container?”
The supervisor itself is a container, so unless you stop the supervisor container, restarting a different container should not reset the supervisor.