Patch script
# cat patch.sh
#!/bin/bash
echo
echo --------------------
echo
date
KERNEL=$(/bin/yum check-update | grep -i 'kernel.x86')
/bin/yum update -y
if [ "$KERNEL" = "" ]; then
echo no kernel update;
echo exit
exit
else
echo kerner update
echo reboot
/sbin/reboot
fi
echo
cron job
57 23 * * * /root/patch.sh 1>>/root/patch.log 2>&1