From 99baed41c08e44c0c5ddf9f911e361efc407ce58 Mon Sep 17 00:00:00 2001 From: Alice Gaudon Date: Tue, 7 Apr 2020 00:12:30 +0200 Subject: [PATCH] kernel-updates-check.sh: display output to stdout and fix sendmail condition --- kernel-updates-check.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel-updates-check.sh b/kernel-updates-check.sh index d376c94..814dc29 100755 --- a/kernel-updates-check.sh +++ b/kernel-updates-check.sh @@ -1,8 +1,10 @@ #!/bin/bash +echo "Checking for kernel updates..." UPDATES=$(checkupdates --download) +echo -e "$UPDATES" -if [ ! -z "$(echo -en UPDATES | grep \"linux\")" ]; then +if [ ! -z "$(echo -en $UPDATES | grep linux)" ]; then echo "Updates available!" echo -e "Updates are available:\n\n$UPDATES" | $(dirname $0)/mail.sh "Updates are available on $(hostname)" fi