I need a script to shutdown differently depending on whether a user called
stop or the system is going down.
Some background: I have two primary functionalities for ending a continuous process that I am running:
suspend. When I call
stop myscript, I would like the
stop functionality to be used. However, when the machine is shutting off, I would like the
suspend functionality to be used. Is this possible with Upstart?
On a similar note, can I create a script-specific keyword that can specify my different shutdown types (such that I could say
stop myscript AND