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