go-zerodown provides a listener which can shutdown gracefully and relaunch in another process.