Allow specifying the threshold on the command line

This commit is contained in:
Salt 2021-08-18 22:59:26 -05:00
parent 875a961eba
commit 8257bd69e2

View File

@ -8,7 +8,7 @@
rr="/var/run/reboot-required"
# 604800 - 1 week in seconds
threshold="604800"
threshold="${1:-604800}"
if [ -f "$rr" ]; then
# We have a pending reboot; alert in different states depending on its age
lastmod=$(date +%s -r "$rr")