I've set up my
/etc/rc.local to start some services using a couple of scripts to bring my system up on reboot.
One script runs as root and starts nginx, mysql, php etc... and works fine.
The other stuff runs as my regular user, so I'm doing a sudo and it doesn't seem to work at boot time. Is there a problem running as unprivileges users at this stage of the boot process?
My rc.local looks like this -
#!/bin/sh touch /var/lock/subsys/local # main system start - web server, db etc... /root/start-services.sh # services run as me /usr/bin/sudo -u tim /home/vhosts/myapp/bin/start-app.sh
Running the scripts when the system is up, everything works fine. But at boot time none of the services in start-app.sh start up and I can't find any trace of any errors in any logs.
What have I done wrong here?