Running scripts at startup
If you want to run a command or a script you wrote and have it run in the background every time Ubuntu starts, then simply add the script to the rc.local file. Make sure your script is executable, and then simply insert the full path of the script into the rc.local file. The rc.local file is in the /etc/ directory for Centos and in /etc/init.d/ for Ubuntu.
If you want to reload the rc.local startup file, without restarting your computer, simply do it as you would execute any other script. Note that this will not shut off any processes that are already running, it will execute all the commands just as it would at startup. If you have something that gives console output it will start displaying on your screen, but you can CTRL+C to get out of it, and all the scripts will continue to run in the background. The good thing about that is that your script will continue to run even after you log out of ssh, unlike if you just normally ran your script, it would cease execution when you logged out.