Commit version 24.12.13800
This commit is contained in:
@ -3,15 +3,16 @@
|
||||
# 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
|
||||
# (c) 2012-2023, Tom Laermans for Observium
|
||||
|
||||
hostname="localhost"
|
||||
port=7634
|
||||
nc=`which nc`
|
||||
PORT=7634
|
||||
|
||||
if [ $? -eq 0 ] && [ `$nc -zv $hostname $port 2>&1 | awk '{print $NF}'` = "open" ]
|
||||
# Test connection
|
||||
OUTPUT=$(nc localhost ${PORT})
|
||||
|
||||
# If no error when tonnecting to the port, show output
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
echo '<<<hddtemp>>>'
|
||||
$nc $hostname $port
|
||||
echo
|
||||
echo $OUTPUT
|
||||
fi
|
||||
|
Reference in New Issue
Block a user