How to Run Bash Script as Root During Startup on Linux
…start off by writing “@reboot.” The reboot command is key here as it tells the cron on reboot this command to run every single time. Directly after reboot, add the full file path to the bash script.
@reboot /home/derrik/startupscript.sh