------------------------------- #!/usr/bin/env ruby while true `sensors`.each_line do |l| if l=~/^M\/B Temp:\W*\+(\d*) C/ if $1.to_f > 45.0 system('halt') end break end end sleep(10) end
No, I don’t trust my mainboard fan.
No, I don’t like sed.
Don’t do this at home, kids.
Do you want to give me feedback about this article in private? Please send it to comments@zerokspot.com.
Alternatively, this website also supports Webmentions. If you write a post on a blog that supports this technique, I should get notified about your link π