kernel-updates-check.sh: display output to stdout and fix sendmail condition
This commit is contained in:
parent
c94d3330bf
commit
99baed41c0
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user