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
yes, thank you so much!
I reach this post with the same issues than @Snake-Sanders, but I tried Nerves.Runtime.halt()
, but this one restarted the Raspberry (B+ 1.2). In my case I have to use Nerves.Runtime.poweroff()
. I read the documentation for halt/0
and poweroff/0
, but I donāt understand the one for the first: āHalt the device (meaning hang, not power off, nor reboot)ā.
Does someone knows what means āhangā on this context? It seems like āsuspendā or something else, although the behaviour in my case is more like ārestartā.