I want to execute a script every time my server start up. The problem is that I need to be a certain user to execute the script, if I try to do it as root it cant find certain packages (such as ruby).
I try to change to xxx user01.
sudo su user01
/etc/init.d/script start
This doesn't work however.

suin the rc script? – Mat Aug 30 '12 at 16:08