Learned something I didn't know today. When you run updates on an Ubuntu headless server, it doesn't tell you when a reboot is required; instead, it creates this file:
/var/run/restart-required
or:
/var/run/reboot-required
Check for the existence of that file. If it's there, do a reboot. It'll be removed during the reboot. I learned this when doing updates to teijenkins.