I have a check on my CentOS box that lets me know if YUM has any updates available or not. I would like to automatically run a script or shell command depending on the result of the check. For example:
The service check returns OK if there are no updates, WARNING for non-security updates, and CRITICAL for security updates.
If the check returns OK or WARNING, do nothing. If it returns CRITICAL, run “yum update”.
Is this possible?