Reboot after hostname change. Background reboot

After changing hostname from rc.local need to reboot, only reliable way

At end of script background reboot was not working.