I built a user-interface to change the IP Adress from my raspberry pi. Now I want the browser heading to my new IP Adress, after a reboot automatically... Something like this:
if( isset( $_POST['reboot'] ) ) {
exec("/sbin/shutdown -r now");
header("Location: $new_ip");
}
It's clear to me, that this can't work, because if I execute the reboot nothing else will processed.
I saw this function in many user-interfaces like from Synology.