gentoo-desktop/etc/acpi/actions/powerbtn.sh
2025-08-17 13:37:46 +02:00

9 lines
171 B
Bash
Executable file

#!/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