Shutdown process / status display.
I want to display the "Off" status on Axon. When we switch OS to shutdown mode (shutdown -h now), I want to turn on the green LED when the user can switch power off. So I will avoid violating the flash card and the os file system.
Can't find a solution, maybe there are some standard solutions?
there is probably a number of ways how to do it. This could be one of them:
/usr/local/sbin/shutdownand add the exec bit to it
- in the script, specify the logic - get the IOs into safe state and/or light up the user LEDs
- at the end of the script, call
shutdown -h now
The logic can use the SysFS approach such as this:
echo 1 > /run/unipi/io_group1/do_1_01/do_value# sets DO1.1 to true
Although you don't have the user LEDs available in the SysFS right now. For that, you can use
mbpolland set it via ModbusTCP.