Following on from this question, I have written a simple upstart service (/etc/init/pms.conf) for my headless Ubuntu Server 11.04 box as follows:
start on filesystem and net-device-up IFACE=eth0 stop on runlevel  respawn exec /home/administrator/pms-current/PMS.sh
I can start (or stop) this service at will from the command line:
service pms start
And I can see that it is indeed running.
However, when I first boot my machine the service does not start. If I SSH into the box and check the service status I get:
$ service pms status pms stop/waiting
My question is why is this happening? Why isn't my service starting on boot?
UPDATE 1: unsure whether my service was being started and subsequently dying or just wasn't being start at all, I added the following to PMS.sh:
echo "STARTED" > $STARTLOG
This obviously just gives me something to look for. I tested this by starting the service myself and then checking start.log. I then deleted the start.log and rebooted. It wasn't there after the restart, so it seems as though upstart definitely isn't starting my service. I suppose it could be dying at an earlier point in the process, but that seems rather unlikely given the simplicity of it all.
UPDATE 2: I've just upgraded to 11.10 which includes an upstart upgrade, but this problem still occurs.
UPDATE 3: As requested, I've booted with
--debug. The output of cat
/var/log/syslog | grep init is too long to place in the question, but you view it here.
UPDATE 4: More logs, this time the upstart conf is included at the top. Run 1 and run 2.
cat /var/log/syslog | grep initafter enabling boot loggging for upstart using the instructions at Upstart Debugging