#! /bin/sh
### BEGIN INIT INFO
# Provides:          rppl-slowcpu
# Required-Start:    $local_fs
# Required-Stop:     
# Default-Start:     S
# Default-Stop:
# Short-Description: Throttle CPU to reduce system power and heat
### END INIT INFO

. /lib/lsb/init-functions

case "$1" in
    start)
	log_begin_msg "Throttling CPU power to 1.6 GHz"
	echo "1600000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
	echo "1600000" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_setspeed
        log_end_msg 0
        ;;
    *)
        echo "Usage: $0 {start}"
        exit 1
esac
