View Single Post
Old 03-12-2014, 07:25 AM   #9
dsmid
Linux devotee
dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.
 
dsmid's Avatar
 
Posts: 598
Karma: 2069047
Join Date: Feb 2011
Device: Kindle 3, Kindle 4B, Kindle PW2
Wouldn't this simple upstart script be better than fiddling with cron ?

/etc/upstart/battery_saver.conf
Code:
start on framework_ready
stop on stopping framework

respawn

script
    while true
    do
        lipc-wait-event com.lab126.powerd readyToSuspend || true
        echo "mem" > /sys/power/state || true
        # Gives us some time to react if something goes wrong
        sleep 60
    done
end script
dsmid is offline   Reply With Quote