Are you sure that your command isn't being run? In my situation, I found that it was being run, but there was an error which caused it to stop. You can figure out if you're getting an error by using something like nohup:
nohup bash /home/ubuntu/myscript.sh > /home/ubuntu/error_log.txt 2>&1 &
bash /home/ubuntu/myscript.sh is the actual command I want run. Check the error log and see what you find.
You might be running something like java or a utility like drush, and your $PATH variable doesn't know how to find it at the time /etc/rc.local is run, which was my problem. The $PATH variable is very minimal at the time of running this script.
If you want to see what's in your $PATH variable at the time of running it, put this in your
echo $PATH > /home/rc_local_path.log
..And check the log file after rebooting. In my case (and probably yours), the path variable was the following:
The error I got was along the lines of
drush - command not found ... so I typed
command -v drush and figured out that it was installed into /usr/local/bin, which was not in the $PATH at the time of running the script, so I made a symlink to it via
ln -s /usr/local/bin/drush /usr/bin/drush. Now my script runs fine without error.