From 21b3a0eff82bda90cf41f1a7748651b997b75f6b Mon Sep 17 00:00:00 2001 From: Matthias Wirth Date: Mon, 9 Dec 2024 11:57:01 +0000 Subject: [PATCH] dietpi: install acpid and configure the power button to perform a shutdown --- src/variants/dietpi/Automation_Custom_Script.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/variants/dietpi/Automation_Custom_Script.sh b/src/variants/dietpi/Automation_Custom_Script.sh index 79374c4d..44533d0c 100644 --- a/src/variants/dietpi/Automation_Custom_Script.sh +++ b/src/variants/dietpi/Automation_Custom_Script.sh @@ -32,7 +32,16 @@ systemctl restart systemd-journald && echo "journal should now be persistent" # when chrony is installed it's imperative that CONFIG_NTP_MODE=0 # (custom/disabled) is set in dietpi.txt to avoid breakage of dietpi-update /boot/dietpi/func/dietpi-set_software ntpd-mode 0 -apt install -y --no-install-recommends chrony jq zstd +apt install -y --no-install-recommends chrony jq zstd acpid + +# also install acpid with the other stuff above and configure the power button to perform a clean shutdown +cat > /etc/acpi/events/power_button <