etc/acpi: add

This commit is contained in:
Luc Bijl 2025-08-17 13:37:46 +02:00
parent 7a7fcebd29
commit 3f7c1b0c7c
5 changed files with 23 additions and 0 deletions

9
etc/acpi/actions/powerbtn.sh Executable file
View file

@ -0,0 +1,9 @@
#!/bin/sh
CURRENT_INIT=`ps -p 1 -o comm=`
if [ "$CURRENT_INIT" = "openrc-init" ]
then
/sbin/openrc-shutdown -p now
else
/sbin/shutdown -h now "Power button pressed"
fi