From 13c22169624e5633977ed62b95aed844301881ac Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 4 Jul 2023 14:10:46 +0200 Subject: [systemstatus] Show (estimate) of last time updates were installed Plus other minor tweaks, like message on main page. --- modules-available/systemstatus/hooks/main-warning.inc.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'modules-available/systemstatus/hooks/main-warning.inc.php') diff --git a/modules-available/systemstatus/hooks/main-warning.inc.php b/modules-available/systemstatus/hooks/main-warning.inc.php index 5707c7d2..02b017e8 100644 --- a/modules-available/systemstatus/hooks/main-warning.inc.php +++ b/modules-available/systemstatus/hooks/main-warning.inc.php @@ -6,6 +6,12 @@ if (file_exists('/run/reboot-required.pkgs')) { Message::addInfo('systemstatus.update-reboot-required', true, implode(', ', $lines)); } +$aptTs = SystemStatus::getAptLastDbUpdateTime(); +if ($aptTs + 864000 < time()) { + // No update for 10 days + Message::addWarning('systemstatus.apt-db-out-of-date', true, Util::prettyTime($aptTs)); +} + if (SystemStatus::diskStat($systemUsage, $storeUsage, $current, $wanted)) { if ($current === $wanted && isset($storeUsage['freeKb']) && $storeUsage['freeKb'] < 60000000) { // 60GB Message::addWarning('systemstatus.storage-low-vmstore', true, Util::readableFileSize($storeUsage['freeKb'], -1 , 1)); -- cgit v1.2.3-55-g7522