#!/bin/sh # hddtemp sensor readings # needs hddtemp daemon listening on (at least) localhost # requires netcat to be installed and in the path # (c) 2012, Tom Laermans for Observium hostname="localhost" port=7634 nc=`which nc` if [ $? -eq 0 ] && [ `$nc -zv $hostname $port 2>&1 | awk '{print $5}'` = "open" ] then echo '<<>>' $nc $hostname $port|sed 's/\x10\x80//g' echo fi