Fix incorrect variable substitution

i.e. a lack thereof
This commit is contained in:
Salt 2021-08-18 23:00:49 -05:00
parent 8257bd69e2
commit 83081b757b

View File

@ -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