Merge branch 'master' into release

This commit is contained in:
Jay 2017-04-28 10:13:06 +08:00
commit e1fa3d2bc7

26
app.js
View File

@ -60,17 +60,19 @@ app.get('/servcmd', (req, res) => {
});
app.get('/fixmysql', (req, res) => {
let cmd = 'rm /home/www/mydb/aria*';
let json = {
rm: '',
restart: ''
};
exec(cmd, (err, stdout, stderr) => {
let cmd = 'systemctl restart mysql';
json.rm = stdout;
exec(cmd, (err, sout, serr) => {
json.restart = sout;
res.send(json);
exec('systemctl stop mysqld', (err, sout, serr) => {
let cmd = 'rm /home/www/mydb/aria*';
let json = {
rm: '',
restart: ''
};
exec(cmd, (err, stdout, stderr) => {
let cmd = 'systemctl restart mysqld';
json.rm = stdout;
exec(cmd, (err, sout, serr) => {
json.restart = sout;
res.send(json);
})
})
})
})
});