Changes
/* Configure power button event handling */
* Ignore power button events handling by systemd, then reboot:
<pre>
$ sed -i s/".*HandlePowerKey.*"/"HandlePowerKey=ignore"/ /etc/systemd/logind.conf$ reboot
</pre>
* Install ACPI related software if not installed yet:
<pre>
$ apt install acpi-support-base acpid
</pre>
button/power LNXPWRBN:00 00000080 00000008
</pre>
NOTE#1: current power button handler is /etc/acpi/powerbtn-acpi-support.sh, but it does not work for some reason
NOTE #2: there are 2 events PBTN and LNXPWRBN, we need to handle only one of them, for example PBTN
* Create custom power button event rule:
<pre>
$ cat > /etc/acpi/events/powerbtn-custom-rule << EOF
event=power (PBTN) 00000080
action=/etc/acpi/powerbtn-custom-handler.sh
EOF