vendredi 30 janvier 2015

Commands to check Linux updates

Those scripts were created to send result by email using cron.

For Suse Linux

Create a shell script and run it by cron every day.

#!/bin/sh
/usr/bin/zypper list-patches | mail -s "SUSE Patch to install"



For Ubuntu

#!/bin/sh
FILE=/tmp/update.log
touch $FILE
/usr/lib/update-notifier/update-motd-updates-available > $FILE

/usr/lib/update-notifier/update-motd-reboot-required >> $FILE

/bin/cat $FILE

Aucun commentaire:

Enregistrer un commentaire