mirror of
https://github.com/Retropex/apolloapi-v2.git
synced 2025-05-29 13:32:30 +02:00
11 lines
269 B
JavaScript
11 lines
269 B
JavaScript
const { exec } = require('child_process')
|
|
|
|
module.exports = ({ define }) => {
|
|
define('shutdown', async (payload, { knex, errors, utils }) => {
|
|
if (process.env.NODE_ENV === 'production') return exec('sudo shutdown -h now')
|
|
return;
|
|
}, {
|
|
auth: true
|
|
})
|
|
}
|