nodeginx.js
function manageNginx (action, callback) {
  // TODO: research if sending signals is better
  // i.e. sudo nginx -s stop|quit|reload
  exec(`sudo service nginx ${action}`, (err, stdout, stderr) => {
    if (err) return callback(err)
    return callback()
  })
}
function manageNginx (action, callback) {
  // TODO: research if sending signals is better
  // i.e. sudo nginx -s stop|quit|reload
  exec(`sudo service nginx ${action}`, (err, stdout, stderr) => {
    if (err) return callback(err)
    return callback()
  })
}
function manageNginx ( action , callback ) { // TODO: research if sending signals is better // i.e. sudo nginx -s stop|quit|reload exec ( ` ${ action } ` , ( err , stdout , stderr ) => { if ( err ) return callback ( err ) return callback ( ) } ) }
Nginx process functions
Nginx process functions