FYI, I noted when first reboot after setting rc local, it didn't kick in on a stress test. I had seen in the many posts, someone having problems with their service in the rc local line not working as the re boot was too fast. A boffin, like yourself, suggested a line sleep 20, first in the rc local field, to "slow" the reboot down, to enable such services to process. Worked a treat with your script as well