From 8257bd69e2f24a5deb7249f06fcc86f846419960 Mon Sep 17 00:00:00 2001
From: Salt <rehashedsalt@cock.li>
Date: Wed, 18 Aug 2021 22:59:26 -0500
Subject: [PATCH] Allow specifying the threshold on the command line

---
 check_reboot_required | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/check_reboot_required b/check_reboot_required
index deee075..57fa29f 100755
--- a/check_reboot_required
+++ b/check_reboot_required
@@ -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")