How to clean shutdown Nerves

I have Nerves running on a Raspberry pi 3. Is there a nice way to perform a clean shutdown nerves or cutting the power is the only way?

Hello Snake-Sanders,

Nerves.Runtime.halt()

Is what you are looking for.

Even more easier is to add an ‘import Nerves.Runtime’ to the rootfs_overlay/etc/iex.exs script, which will allow you to just use ‘halt’.

Kind regards,

Jochen

1 Like

yes, thank you so much!