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