mirror of
https://github.com/Retropex/apolloapi-v2.git
synced 2025-05-29 13:32:30 +02:00
Changed system commands
This commit is contained in:
parent
6d8b869a1e
commit
fa9c846e35
2
apolloui
2
apolloui
@ -1 +1 @@
|
||||
Subproject commit 1d6eb6b862f9ed6fdbbd7c6d9f1c6f357e631b3c
|
||||
Subproject commit c0d56f4c4d3eafdf01a8499ddff32d0fcb19506e
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user