Changed system commands

This commit is contained in:
Michele Marcucci 2021-07-05 12:37:39 +02:00
parent 6d8b869a1e
commit fa9c846e35
3 changed files with 3 additions and 3 deletions

@ -1 +1 @@
Subproject commit 1d6eb6b862f9ed6fdbbd7c6d9f1c6f357e631b3c
Subproject commit c0d56f4c4d3eafdf01a8499ddff32d0fcb19506e

View File

@ -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

View File

@ -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