Have custom prpr message queues that I'm trying to run through /etc/init.d in ubuntu. All 3 scripts are super simple single-line and work fine on the command line, but for some reason, only one of them really works when the server boots. All have 775 perm, and this works great:
sudo /etc/init.d/app-poller.sh
Here's an example script (should run as the www-data user):
[/etc/init.d]$ cat /etc/init.d/app-poller.sh #!/bin/sh su - www-data -c "bash -c '/path/to/dropr-server/daemons/app-poller.php'"
I ran / re-entered inittab entries several times through:
updates-rc.d -f app-poller.sh remove updates-rc.d app-poller.sh defaults
The rcconf script also says that everything starts fine. I followed all the instructions here: http://jonathonhill.net/2009-04-23/auto-start-a-shell-script-on-ubuntu-server/ here and here: http://stringofthoughts.wordpress.com/ 2009/04/16 / adding-removing-shell-scripts-ubuntu-810 /
And I searched for the output in all the usual suspects (/ var / log / messages, / var / log / daemons, etc.) ... there is still no clue.
I would really like to at least get an idea of โโwhy this fails. Does anyone know which log files I can link to see what is going wrong and why?
source share