18 lines
373 B
Bash
Executable File
18 lines
373 B
Bash
Executable File
#!/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 $NF}'` = "open" ]
|
|
then
|
|
echo '<<<hddtemp>>>'
|
|
$nc $hostname $port
|
|
echo
|
|
fi
|