You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#!/bin/sh
|
|
|
|
acpi -b | awk -F'[,:%]' '{print $2, $3}' | {
|
|
|
|
read -r status capacity
|
|
|
|
|
|
|
|
if [ "$status" = Discharging -a "$capacity" -lt 5 ]; then
|
|
|
|
logger "Critical battery threshold"
|
|
|
|
systemctl hibernate
|
|
|
|
fi
|
|
|
|
}
|