I'm just getting into upstart so i wrote a very basic script just to print to log file called: vm-service.confvm-service.conf that iI put in /etc/init/etc/init:
description "Virtual Images"
author "Me"
start on runlevel [2345]
stop on runlevel [016]
respawn
script
echo "DEBUG: `set`" >> /tmp/vm-service.log
end script
pre-stop script
echo "DEBUG: `set`" >> /tmp/vm-service.log
end script
if iI run:
sudo start vm-service
it sudo start vm-service, it outputs:
vm-service start/running, process 29034
vm-service start/running, process 29034
butBut, when iI run:
sudo stop vm-service
it sudo stop vm-service, it outputs:
stop: Unknown instance
stop: Unknown instance
I've tried running:
sudo initctl reload-configuration
but sudo initctl reload-configuration, but i still get the error on stop.
Any help would be appreciated. I'veI've looked at the cookbook
But i'm but I'm probably missing something probably obvious.