To find whether Ubuntu requires a reboot or not, is as simply as checking if a special file exists.
To do so:
file /var/run/reboot-required -------------------------- ls /var/run/reboot-required | grep required
If the file exists, system would require a reboot.