This script attempts to add generic GPIO Power Off support, however it does require that the power off trigger is active-low.
The systemd shutdown script gpio-poweroff retrieves its settings from cleanshutd.conf and an additional block has been added to install.sh to set the poweroff-pin setting.
TODO:
Add "press and hold" functionality, daemon should sleep for hold_time and check button state again before triggering shutdown
Add "blink to indicate" functionality, daemon should fire up optional led_pin and blink it quickly to indicate that shutdown has been triggered (to go hand-in-hand with .1)
This script attempts to add generic GPIO Power Off support, however it does require that the power off trigger is active-low.
The systemd shutdown script
gpio-poweroff
retrieves its settings fromcleanshutd.conf
and an additional block has been added toinstall.sh
to set thepoweroff-pin
setting.TODO:
hold_time
and check button state again before triggering shutdownled_pin
and blink it quickly to indicate that shutdown has been triggered (to go hand-in-hand with .1)