Resume bash script after reboot

I often write bash scripts to automate common tasks in my projects. Often the script makes changes that requires a reboot. And when the machine finishes rebooting the script needs to resume from where it left. Following script creates a temporary file that we use as a flag in the script to check if the script is resuming from reboot. We also temporarily update the .bashrc or .zshrc to trigger [Read More]