Search code examples
node.jsforever

Was --killSignal flag removed from forever?


When I use the killSignal flag when stopping a nodejs script with forever it ignores it. My command is (where index.js is the nodejs script):

forever --killSignal=SIGTERM stop index.js

Am I using the flag the wrong way? Can anyone get the killSignal flag to work? I'm using forever version 0.15.1, installed globally.


Solution

  • Got a response from forever on Github. That flag should be used in the start command and not the stop command. E.g.:

    forever --killSignal=SIGTERM start script.js
    

    Then when you run stop, it will send the correct kill signal.