Muthu Kumar
7 years ago
5 changed files with 23 additions and 16 deletions
@ -0,0 +1,14 @@ |
|||||
|
var { exec } = require('child_process'); |
||||
|
|
||||
|
function nginxReload() { |
||||
|
exec('service nginx reload', (error, stdout, stderr) => { |
||||
|
if (error) { |
||||
|
console.error(`exec error: ${error}`); |
||||
|
return; |
||||
|
} |
||||
|
console.log(`stdout: ${stdout}`); |
||||
|
console.log(`stderr: ${stderr}`); |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
module.exports = nginxReload; |
Loading…
Reference in new issue