View Single Post
Posts: 188 | Thanked: 223 times | Joined on Apr 2013 @ Poland
#5
Nobody?

I started something on my own, created two scripts each for over and underclock. underclock is easy and works. I will now try to run overclock script. I created something like this, will it work?

Code:
Filename: /usr/local/bin/overclock
#!/bin/sh
BATTERY=`cat /sys/class/power_supply/bq27200-0/capacity`
echo "Battery is:" $BATTERY "% full"
kernel-config load 1100
if [ $BATTERY -lt "90" ] ; then kernel-config load 1000 ; fi
if [ $BATTERY -lt "85" ] ; then kernel-config load 950 ; fi
if [ $BATTERY -lt "80" ] ; then kernel-config load 850 ; fi
if [ $BATTERY -lt "65" ] ; then kernel-config load 800 ; fi
if [ $BATTERY -lt "50" ] ; then kernel-config load 720 ; fi
if [ $BATTERY -lt "35" ] ; then kernel-config load 600 ; fi
if [ $BATTERY -lt "25" ] ; then kernel-config load 500 ; fi
if [ $BATTERY -lt "15" ] ; then kernel-config load 250 ; fi
And if so, is there a way to make scripts activates the offline mode if say baterry reach 10%?