#!/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 '<<<hddtemp>>>'
  $nc $hostname $port
  echo
fi
