Some temperature control script for ubuntu

Does anyone of you know a script, which controls the speed of the fans depending on the temperature?