Add kernel-udpates-check.sh

This commit is contained in:
Alice Gaudon 2020-02-02 07:08:03 +01:00
parent 35e20bd0f7
commit 05ec42e03b
1 changed files with 9 additions and 0 deletions

9
kernel-updates-check.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
UPDATES=$(checkupdates --download)
if [ ! -z "$(echo -en UPDATES | grep \"linux\")" ]; then
echo "Updates available!"
UPDATES=$(checkupdates --download)
echo -e "Updates are available:\n\n$UPDATES" | $(dirname $0)/mail.sh "Updates are available on $(hostname)"
fi