From 69d04d06486a3d6c6daa47ab29a6fd2407cae8a4 Mon Sep 17 00:00:00 2001 From: Willi Eggeling Date: Sun, 24 Mar 2019 14:27:49 +0100 Subject: [PATCH] shutdown controller on SIGTERM (#1313) Previously, the controller was only properly shutdown on SIGINT. SIGTERM is used by kill (unix) and to stop Docker containers. --- index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/index.js b/index.js index 0f141b2e7..c9f2eb59b 100644 --- a/index.js +++ b/index.js @@ -11,6 +11,7 @@ const controller = new Controller(); controller.start(); process.on('SIGINT', handleQuit); +process.on('SIGTERM', handleQuit); function handleQuit() { controller.stop(() => process.exit());