Skip to main content
edited title
Link
adviner
  • 193
  • 1
  • 1
  • 5

Starting on Using upstart with stop unknown instance

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.

I'm just getting into upstart so i wrote a very basic script just to print to log file called: vm-service.conf that i put in /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 i run: sudo start vm-service it outputs: vm-service start/running, process 29034

but when i run: sudo stop vm-service it outputs: stop: Unknown instance

I've tried running: sudo initctl reload-configuration but i still get the error on stop.

Any help would be appreciated. I've looked at the cookbook

But i'm missing something probably obvious

I'm just getting into upstart so i wrote a very basic script just to print to log file called: vm-service.conf that I put in /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 I run sudo start vm-service, it outputs:

vm-service start/running, process 29034

But, when I run sudo stop vm-service, it outputs:

stop: Unknown instance

I've tried running sudo initctl reload-configuration, but i still get the error on stop.

I've looked at the cookbook but I'm probably missing something obvious.

Source Link
adviner
  • 193
  • 1
  • 1
  • 5

Starting on upstart with stop unknown instance

I'm just getting into upstart so i wrote a very basic script just to print to log file called: vm-service.conf that i put in /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 i run: sudo start vm-service it outputs: vm-service start/running, process 29034

but when i run: sudo stop vm-service it outputs: stop: Unknown instance

I've tried running: sudo initctl reload-configuration but i still get the error on stop.

Any help would be appreciated. I've looked at the cookbook

But i'm missing something probably obvious