Skip to content

Commit

Permalink
Merge branch 'master' of github.com:retrobox/overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
lefuturiste committed Jul 14, 2019
2 parents d87a3d7 + 5acfbcd commit 6f388f8
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions src/overlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,23 +151,19 @@ module.exports = class Overlay {
})
}
shutdown () {
return new Promise((resolve, reject) => {
childProcess.exec("poweroff", (err, stdout, stderr) => {
if (err || stderr != '') return reject()

return resolve({ack: true})
return new Promise(resolve => {
resolve({
ack: true
})
childProcess.exec("poweroff")
})
}
reboot () {
return new Promise((resolve, reject) => {
childProcess.exec("reboot", (err, stdout, stderr) => {
if (err || stderr != '') return reject()

return resolve({
ack: true
})
return new Promise(resolve => {
resolve({
ack: true
})
childProcess.exec("reboot")
})
}
}

0 comments on commit 6f388f8

Please sign in to comment.