Fix incorrect variable substitution
i.e. a lack thereof
This commit is contained in:
parent
8257bd69e2
commit
83081b757b
@ -14,10 +14,10 @@ if [ -f "$rr" ]; then
|
|||||||
lastmod=$(date +%s -r "$rr")
|
lastmod=$(date +%s -r "$rr")
|
||||||
now=$(date +%s)
|
now=$(date +%s)
|
||||||
if (( now - lastmod > threshold )); then
|
if (( now - lastmod > threshold )); then
|
||||||
echo "CRITICAL - Pending reboot older than $threshold seconds: $(cat rr)"
|
echo "CRITICAL - Pending reboot older than $threshold seconds: $(cat "$rr")"
|
||||||
exit 2
|
exit 2
|
||||||
else
|
else
|
||||||
echo "WARNING - Pending reboot: $(cat rr)"
|
echo "WARNING - Pending reboot: $(cat "$rr")"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user