This commit is contained in:
2026-09-17 00:36:31 +02:00
parent 8efcc9eac6
commit 6e5b63a3ad
13 changed files with 320 additions and 0 deletions
@@ -0,0 +1,13 @@
[Unit]
Description=Run command before shutdown
DefaultDependencies=no
Before=shutdown.target reboot.target halt.target
[Service]
Type=oneshot
ExecStart=/bin/true
ExecStop=/usr/local/bin/pre-shutdown.sh
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
+8
View File
@@ -0,0 +1,8 @@
#!/bin/bash
echo "System is shutting down at $(date)" >> /var/log/pre-shutdown.log
for i in `cat /proc/acpi/wakeup|grep enabled|awk '{ print $1 }'`
do
echo $i
echo $i > /proc/acpi/wakeup
done