Split script into parts for pre and post reboot