#!/bin/sh

# hddtemp sensor readings
# needs hddtemp daemon listening on (at least) localhost
# requires netcat to be installed and in the path
# (c) 2012-2023, Tom Laermans for Observium

PORT=7634

# Test connection
OUTPUT=$(nc localhost ${PORT})

# If no error when tonnecting to the port, show output
if [ $? -eq 0 ]
then
  echo '<<<hddtemp>>>'
  echo $OUTPUT
fi
