2020-02-02 07:08:03 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2020-04-07 00:12:30 +02:00
|
|
|
echo "Checking for kernel updates..."
|
2020-02-02 07:08:03 +01:00
|
|
|
UPDATES=$(checkupdates --download)
|
2020-04-07 00:12:30 +02:00
|
|
|
echo -e "$UPDATES"
|
2020-02-02 07:08:03 +01:00
|
|
|
|
2020-04-07 00:12:30 +02:00
|
|
|
if [ ! -z "$(echo -en $UPDATES | grep linux)" ]; then
|
2020-02-02 07:08:03 +01:00
|
|
|
echo "Updates available!"
|
|
|
|
echo -e "Updates are available:\n\n$UPDATES" | $(dirname $0)/mail.sh "Updates are available on $(hostname)"
|
2020-02-04 07:37:54 +01:00
|
|
|
fi
|