freebsd port update, monitor outdated port with portsnap
we have about 15 freebsd servers with us, ranging from freebsd 4.7 to freebsd 7. most of the server need to be patched regularly, except servers that are not accessible from public network. one of the method we use to monitor outdated port is using portsnap cron, it update the port tree base on the date/time you configured on crontab, and when there is any port is outdated, it will notify us through email from system message.
setting up port tree update on cron
fire up your crontab with crontab -e and add this line;
0 7 * * * portsnap -I cron update && pkg_version -vIL=
this will update the port tree every morning 7am and if there is any output from the command pkg_version -vIL=, it will send an email to system root.
alias root to your email address
if you wish to receive the notification through your email, on /etc/aliases file, alias root to your_email_address, remember to run newaliases command after update the file.
Email notification from different servers.
Port that outdated and need to be upgraded.
[…] on FreeBSD Server. Make sure you are on the latest FreeBSD Port Tree with portsnap, refer to keeping update ports. If you want to browse through what version of MySQL is available in […]