Execute functions after response.
This commit is contained in:
parent
5f71e48c38
commit
64343bfc0b
6
index.js
6
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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue