update
This commit is contained in:
parent
39de6890b2
commit
462681a1c9
|
@ -48,3 +48,18 @@ exports.ReadConfig = async function (req, res) {
|
|||
};
|
||||
|
||||
|
||||
exports.Reset = async function (req, res) {
|
||||
console.log("Reset " + req.body.path);
|
||||
const { execSync } = require('child_process');
|
||||
execSync('sudo systemctl stop S905X_BI');
|
||||
execSync('sudo systemctl disable S905X_BI');
|
||||
execSync('rm /root/monitor/setup/engine.json');
|
||||
|
||||
if (req.body.path !== "") {
|
||||
execSync('rm -rf ' + req.body.path);
|
||||
}
|
||||
|
||||
res.send({status:true});
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -13,4 +13,6 @@ module.exports = function (app) {
|
|||
|
||||
app.route('/ReadConfig').post(Api.ReadConfig);
|
||||
|
||||
app.route('/Reset').post(Api.Reset);
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user