service_files/openrc/fix-suspend

23 lines
540 B
Plaintext
Raw Normal View History

2024-12-18 10:57:10 -03:00
#!/sbin/openrc-run
name="fix-suspend"
description="fixes instant wakeups from suspend by disabling PTXH in /proc/acpi/wakeup"
command="/bin/bash"
command_args="-c 'echo PTXH > /proc/acpi/wakeup'"
pidfile="/var/run/${RC_SVCNAME}.pid"
start(){
ebegin "Starting fix-suspend"
/bin/bash -c 'echo PTXH > /proc/acpi/wakeup'
eend "${?}"
}
stop(){
ebegin "Stopping fix-suspend"
/bin/bash -c 'echo PTXH > /proc/acpi/wakeup'
eend "${?}"
}
status(){
einfo "this service is not a background process, it runs as you start and stop it"
}