I have a node.js script which need to start at boot and run under the www-data user. During development I always started the script with:
su www-dat
In Ubuntu I noticed there are 2 files. The real one is /etc/init.d/rc.local; it seems the other /etc/rc.local is bogus?
/etc/init.d/rc.local
/etc/rc.local
Once I modified the correct one (/etc/init.d/rc.local) it did execute just as expected.