#!/sbin/runscript # Author: Jason Parekh jasonparekhNOSPAM AT gmail DOT com # modified by nick barcet nickNOSPAM AT barcet DOT com # modified for Gentoo by shawn.t.rutledge@gmail.com # Do NOT "set -e" start() { ebegin "Starting AppleSMC fan control" start-stop-daemon --start --exec /usr/local/sbin/tempmon \ --background --pidfile /var/run/tempmon.pid --make-pidfile eend $? } stop() { ebegin "Stopping AppleSMC fan control" start-stop-daemon --stop --exec /usr/local/sbin/tempmon \ --pidfile /var/run/tempmon.pid sleep 1 # Put the fan back to auto regulation #~ echo 1 > /sys/devices/platform/applesmc.768/fan2_min echo 1 > /sys/devices/platform/applesmc.768/fan1_min eend $? }