Add logging statements for ble endpoints for reset, restart and update
This commit is contained in:
parent
1c14520c6a
commit
6accb1ba83
8
index.js
8
index.js
|
@ -539,13 +539,18 @@ function bSequenceStop (obj, cb) {
|
|||
}
|
||||
|
||||
function bReset (obj, cb) {
|
||||
log.info(`reset`, { time : +new Date() })
|
||||
log.info(`reset`, { method: 'ble' })
|
||||
intval.reset()
|
||||
setTimeout(cb, 10)
|
||||
}
|
||||
|
||||
function bUpdate (obj, cb) {
|
||||
log.info('update', { method : 'ble' })
|
||||
exec('sh ./scripts/update.sh', (err, stdio, stderr) => {
|
||||
if (err) {
|
||||
log.error('update', err)
|
||||
}
|
||||
log.info('update', { stdio : stdio })
|
||||
cb()
|
||||
setTimeout(() => {
|
||||
process.exit(0)
|
||||
|
@ -553,6 +558,7 @@ function bUpdate (obj, cb) {
|
|||
})
|
||||
}
|
||||
function bRestart (obj, cb) {
|
||||
log.info('restart', { method : 'ble' })
|
||||
cb()
|
||||
setTimeout(() => {
|
||||
process.exit(0)
|
||||
|
|
Loading…
Reference in New Issue