diff --git a/apolloui b/apolloui index 1d6eb6b..c0d56f4 160000 --- a/apolloui +++ b/apolloui @@ -1 +1 @@ -Subproject commit 1d6eb6b862f9ed6fdbbd7c6d9f1c6f357e631b3c +Subproject commit c0d56f4c4d3eafdf01a8499ddff32d0fcb19506e diff --git a/src/store/api/mcu/mcuReboot.js b/src/store/api/mcu/mcuReboot.js index b77ab60..3682da6 100644 --- a/src/store/api/mcu/mcuReboot.js +++ b/src/store/api/mcu/mcuReboot.js @@ -2,7 +2,7 @@ const { exec } = require('child_process') module.exports = ({ define }) => { define('reboot', async (payload, { knex, errors, utils }) => { - if (process.env.NODE_ENV === 'production') return exec('/etc/system_reboot.sh'); + if (process.env.NODE_ENV === 'production') return exec('sudo reboot'); return; }, { auth: true diff --git a/src/store/api/mcu/mcuShutdown.js b/src/store/api/mcu/mcuShutdown.js index b9417c5..0ad92f6 100644 --- a/src/store/api/mcu/mcuShutdown.js +++ b/src/store/api/mcu/mcuShutdown.js @@ -2,7 +2,7 @@ const { exec } = require('child_process') module.exports = ({ define }) => { define('shutdown', async (payload, { knex, errors, utils }) => { - if (process.env.NODE_ENV === 'production') return exec('/etc/system_shutdown.sh') + if (process.env.NODE_ENV === 'production') return exec('sudo shutdown -h now') return; }, { auth: true