From 64343bfc0b669a193e9b110ff65cbbc008d2c9a5 Mon Sep 17 00:00:00 2001 From: mmcwilliams Date: Thu, 8 Feb 2018 15:46:51 -0500 Subject: [PATCH] Execute functions after response. --- index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index f342427..07c0d2c 100644 --- a/index.js +++ b/index.js @@ -346,13 +346,15 @@ function rSequence (req, res, next) { function rUpdate (req, res, next) { exec('sh ./scripts/update.sh', (err, stdio, stderr) => { - res.send({ success : true }) + res.send({ success : true, action : 'update' }) + res.end() process.exit(0) }) } function rRestart (req, res, next) { - res.send({ success : true }) + res.send({ success : true, action : 'restart' }) + res.end() process.exit(0) }