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")
|
||||
now=$(date +%s)
|
||||
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
|
||||
else
|
||||
echo "WARNING - Pending reboot: $(cat rr)"
|
||||
echo "WARNING - Pending reboot: $(cat "$rr")"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user