Hi again,
here is what I'm using now:
/etc/acpi/acpi_handler.sh
Code:
#!/bin/sh
user=$(who|grep " :0 "|cut -d" " -f1)
case "$1" in
"button/power")
if [ ! "$user" ];then
/sbin/poweroff
fi
;;
*)
logger "ACPI group $1 / action $2 is not defined"
;;
esac
edit: the format goes away
NeoMetal thank you!