From 63eee43386b0e78bcd98301ff1fc192b9301eca1 Mon Sep 17 00:00:00 2001 From: mmcwilliams Date: Fri, 12 Jan 2018 17:48:26 -0500 Subject: [PATCH] Simply exit process to restart. --- index.js | 4 +++- scripts/update.sh | 4 +--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 02b217d..80fcbd8 100644 --- a/index.js +++ b/index.js @@ -521,7 +521,9 @@ function seq () { } function update (req, res, next) { - exec('sh ./scripts/update.sh') + exec('sh ./scripts/update.sh', (err, stdio, stderr) => { + process.exit() + }) } function index (req, res, next) { diff --git a/scripts/update.sh b/scripts/update.sh index 005dee0..a866bc5 100644 --- a/scripts/update.sh +++ b/scripts/update.sh @@ -2,6 +2,4 @@ sudo -u pi -i<< EOF cd /home/pi/intval3 && git pull -EOF - -cd /home/pi/intval3 && sudo pm2 restart process.json \ No newline at end of file +EOF \ No newline at end of file