changeset 376:752c0861a7c3

Fix tailing output in update check "-2" means "last two lines". We want "not the first two lines" because the first two are the metadata date and a blank line. This should stop the emails that are just the metadata date!
author IBBoard <dev@ibboard.co.uk>
date Sat, 25 Sep 2021 14:59:33 +0100
parents a8a7b2b343b5
children 18765f598232
files manifests/templates.pp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/manifests/templates.pp	Sat Jul 17 15:12:13 2021 +0100
+++ b/manifests/templates.pp	Sat Sep 25 14:59:33 2021 +0100
@@ -840,7 +840,7 @@
 	}
 	# Notify of available updates
 	cron { 'check-yum-updates':
-		command => '/usr/bin/yum check-update | tail -2 | grep -Ev "^ \* [[:alnum:]-]+: [[:alnum:]\.]+$"',
+		command => '/usr/bin/yum check-update | tail -n +2 | grep -Ev "^ \* [[:alnum:]-]+: [[:alnum:]\.]+$"',
 		hour => '4',
 		minute => '30',
 		weekday => '0-6/3', #Sunday, Wednesday and Saturday morning