Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Use cubieboard power button for poweroff on Debian

Use cubieboard power button for poweroff on Debian

install acpid

sudo apt-get install acpid

listen on power button press and execute powerbtn.sh

pico /etc/acpi/events/power

File contents:

	event=button/power
	action=/etc/acpi/powerbtn.sh %e

script that can handle all the button actions for now it poweroffs the cubieboard

pico /etc/acpi/powerbtn.sh

File contents:

	exec poweroff

make the script executable

chmod +x /etc/acpi/powerbtn.sh

start acpi listener on system start

pico /etc/init/acpid.conf

File contents:

	exec acpid -c /etc/acpi/events -s /var/run/acpid.socket
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.