Fall back to dpkg status time in health-check.sh last update check
This commit is contained in:
1 parent
4eec7a0c6e
commit
c57fc83dc8
1 file changed
+4
@@ -246,6 +246,10 @@ check_updates() {
|
|||||||
last_epoch=""
|
last_epoch=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -z "$last_epoch" ] && [ -f /var/lib/dpkg/status ]; then
|
||||||
|
last_epoch=$(stat -c %Y /var/lib/dpkg/status 2>/dev/null || echo "")
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -n "$last_epoch" ]; then
|
if [ -n "$last_epoch" ]; then
|
||||||
last_days=$(( (now - last_epoch) / 86400 ))
|
last_days=$(( (now - last_epoch) / 86400 ))
|
||||||
if [ "$last_days" -ge 30 ]; then
|
if [ "$last_days" -ge 30 ]; then
|
||||||
|
|||||||
Reference in new issue
Block a user