fix
This commit is contained in:
parent
462681a1c9
commit
acdbf18d9c
|
@ -23,6 +23,12 @@ exports.ReadEngineConfig = async function (req, res) {
|
||||||
var path = '/root/monitor/setup/engine.json';
|
var path = '/root/monitor/setup/engine.json';
|
||||||
if (fs.existsSync(path)) {
|
if (fs.existsSync(path)) {
|
||||||
var text = fs.readFileSync(path,'utf8');
|
var text = fs.readFileSync(path,'utf8');
|
||||||
|
if (text === "") {
|
||||||
|
const { execSync } = require('child_process');
|
||||||
|
execSync('rm /root/monitor/setup/engine.json');
|
||||||
|
execSync('sudo systemctl stop S905X_BI');
|
||||||
|
execSync('sudo systemctl disable S905X_BI');
|
||||||
|
}
|
||||||
res.send({status:true,data:text});
|
res.send({status:true,data:text});
|
||||||
} else {
|
} else {
|
||||||
res.send({status:false});
|
res.send({status:false});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user