I have a raspberry with lighttpd and php. Now I want to display webpage content before the raspberry is rebooting when I click on a link. I have create the page below. But when I load the page it isn’t display the content but it is direct rebooting.
<?php echo "<html>"; echo "<head>"; echo "<meta http-equiv=refresh content=\"15; url=rebooted.html\">"; echo "</head>"; echo "<body>"; echo "<p><b>The device is restarting now. Please wait.</b><p>"; echo "</body>"; echo "</html>"; flush(); system('sudo /sbin/reboot'); ?>
Anyone any idea how I can solve this?