0

When I try: stop mysite_api, I get:

stop: Rejected send message, 1 matched rules; type="method_call", sender=":1.11" (uid=1000 pid=2242 comm="stop mysite_api ") interface="com.ubuntu.Upstart0_6.Job" member="Stop" error name="(unset)" requested_reply="0" destination="com.ubuntu.Upstart" (uid=0 pid=1 comm="/sbin/init")

My script is:

description "Mysite API Server"
author "Mysite"

start on vagrant-mounted
stop on runlevel [!2345]

respawn

script
    cd /vagrant/Mysite/api
    exec sudo -u vagrant python api.py
end script
1

This isn't an answer yet, but I can edit later. What happens if you change your script to this:

description "Mysite API Server"
author "Mysite"

start on vagrant-mounted
stop on runlevel [!2345]

respawn

setuid vagrant
chdir /vagrant/Mysite/api

exec python api.py
  • I guess it was good enough. – Brian.D.Myers Apr 3 '14 at 0:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.