Changing upower configuration to use percentages and poweroff the device when the critical battery level has been reached

This commit is contained in:
Xavi Garcia Mena 2016-03-30 15:09:04 +02:00
parent e04d8b7dd8
commit 0fbe88364f

View File

@ -0,0 +1,10 @@
#! /bin/sh
set -e
echo "Updating upower configuration..."
sed -i 's/^UsePercentageForPolicy=.*/UsePercentageForPolicy=true/' /etc/UPower/UPower.conf
sed -i 's/^CriticalPowerAction=.*/CriticalPowerAction=PowerOff/' /etc/UPower/UPower.conf