security.d/chk_sensors

changeset 17
65656789da08
parent 14
59e07bba67cc
equal deleted inserted replaced
16:37f217a8bcce 17:65656789da08
1 #!/bin/bash 1 #!/bin/bash
2 # 2 #
3 ############################################################################# 3 #############################################################################
4 # Copyright (C) 2005-2012 4 # Copyright (C) 2005-2013
5 # 5 #
6 # Michiel Broek <mbse@mbse.eu> 6 # Michiel Broek <mbse at mbse.eu>
7 # Beekmansbos 10
8 # 1971 BV IJmuiden
9 # the Netherlands
10 # 7 #
11 # This file is part of SlackSecCheckScripts. 8 # This file is part of SlackSecCheckScripts.
12 # 9 #
13 # This package is free software; you can redistribute it and/or modify it 10 # This package is free software; you can redistribute it and/or modify it
14 # under the terms of the GNU General Public License as published by the 11 # under the terms of the GNU General Public License as published by the
42 fi 39 fi
43 40
44 if [ -x /usr/bin/sensors ]; then 41 if [ -x /usr/bin/sensors ]; then
45 if [ ! -n "$(sensors -s 2>&1)" ]; then 42 if [ ! -n "$(sensors -s 2>&1)" ]; then
46 result=`sensors 2>&1` 43 result=`sensors 2>&1`
47 echo "$result"
48 if echo "$result" |grep -q "ALARM"; then 44 if echo "$result" |grep -q "ALARM"; then
45 echo "$result"
49 echo "" 46 echo ""
50 echo "** WARNING: One or more sensors show ALARM! **" 47 echo "** WARNING: One or more sensors show ALARM! **"
51 fi 48 fi
52 fi 49 fi
53 fi 50 fi

mercurial