From 49124021a895392dbdfc49f3eabf27db3573732d Mon Sep 17 00:00:00 2001 From: Gerkiz <39602942+Gerkiz@users.noreply.github.com> Date: Wed, 25 Jul 2018 21:47:03 +0200 Subject: [PATCH] Added docker support Docker doesn't really do anything with the '/quit'. However, changing from 'quit' to 'serverprocess.kill("SIGINT");' solved this issue. The node exits with: '[dumb-init] Child exited with status 0. Goodbye.' --- client.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client.js b/client.js index 97df1cde..2d3e8592 100644 --- a/client.js +++ b/client.js @@ -433,8 +433,8 @@ write-data=${ path.resolve(config.instanceDirectory, instance) }\r\n fs.copySync(path.join(instancedirectory, "instanceMods"), path.join(instancedirectory, "mods")); process.on('SIGINT', function () { - console.log("Caught interrupt signal, sending /quit"); - messageInterface("/quit"); + console.log("Caught interrupt signal, sending ^C"); + serverprocess.kill("SIGINT"); }); // Spawn factorio server @@ -1082,4 +1082,4 @@ function hashMods(instanceName, callback) { } }); } -} \ No newline at end of file +}