It is important to run grub-ugrade... script, once the system is upgraded, before restarting, otherwise you will have
to boot system manually...
In order to do such thing, Ajax jquery request needs to be performed. Reacting on 'complete' event.
Make sure curl is properly loaded on php server by looking into CURL part via phpinfo();