Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Is there a way to know within the script if the job in question was killed(crashed) or stopped normaly.

I want to kill another process in post-stop script only when the current job crashed and not when it was stopped using stop "task-A"

share|improve this question
add comment

1 Answer 1

See my other answer: Customizing upstart "restart" commands

Make a task-B that has start condition as start on stopping task-A RESULT=failed and do the killing there, or just add to your to-be-killed job a stop gracefully on stop on stopping task-A RESULT=failed.

More in Cookbook.

share|improve this answer
    
Thanks added a new task. –  Andy May 30 '13 at 12:27
    
If it worked for you, please accept the answer to signal you have received help. –  Tuminoid May 31 '13 at 4:00
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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