Merge branch 'master' into release
This commit is contained in:
commit
e1fa3d2bc7
6
app.js
6
app.js
@ -60,17 +60,19 @@ app.get('/servcmd', (req, res) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
app.get('/fixmysql', (req, res) => {
|
app.get('/fixmysql', (req, res) => {
|
||||||
|
exec('systemctl stop mysqld', (err, sout, serr) => {
|
||||||
let cmd = 'rm /home/www/mydb/aria*';
|
let cmd = 'rm /home/www/mydb/aria*';
|
||||||
let json = {
|
let json = {
|
||||||
rm: '',
|
rm: '',
|
||||||
restart: ''
|
restart: ''
|
||||||
};
|
};
|
||||||
exec(cmd, (err, stdout, stderr) => {
|
exec(cmd, (err, stdout, stderr) => {
|
||||||
let cmd = 'systemctl restart mysql';
|
let cmd = 'systemctl restart mysqld';
|
||||||
json.rm = stdout;
|
json.rm = stdout;
|
||||||
exec(cmd, (err, sout, serr) => {
|
exec(cmd, (err, sout, serr) => {
|
||||||
json.restart = sout;
|
json.restart = sout;
|
||||||
res.send(json);
|
res.send(json);
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
});
|
Loading…
Reference in New Issue
Block a user