mirror of
https://github.com/cmur2/munin-pcsensor.git
synced 2024-12-22 12:54:27 +01:00
Fix hiding pcsensor exit code of head
This commit is contained in:
parent
632b81b9f9
commit
45230791ff
8
pcsensor
8
pcsensor
@ -18,14 +18,14 @@ if [ "${1}" = "config" ]; then
|
|||||||
echo "temp.label temperatue"
|
echo "temp.label temperatue"
|
||||||
echo "temp.type GAUGE"
|
echo "temp.type GAUGE"
|
||||||
else
|
else
|
||||||
TEMP=`${PCSENSOR} -cm | head -n 1`
|
TEMP=$(${PCSENSOR} -cm)
|
||||||
if [[ $? != 0 ]]; then
|
if [[ $? != 0 ]]; then
|
||||||
sleep 2
|
sleep 2
|
||||||
TEMP=`${PCSENSOR} -cm | head -n 1`
|
TEMP=$(${PCSENSOR} -cm)
|
||||||
if [[ $? != 0 ]]; then
|
if [[ $? != 0 ]]; then
|
||||||
sleep 6
|
sleep 6
|
||||||
TEMP=`${PCSENSOR} -cm | head -n 1`
|
TEMP=$(${PCSENSOR} -cm)
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
echo "temp.value $TEMP"
|
echo "temp.value $(echo -n "$TEMP" | head -n 1)"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user