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