0.0.5 • Published 9 years ago

ocelot v0.0.5

Weekly downloads
4
License
MIT
Repository
-
Last release
9 years ago

Ocelot

Spawn/exec commands as other users on OS X and Linux, by impersonating them. Like Ocelot.

Example

var ocelot = require('./');

ocelot.exec_as('someone', 'whoami', function(err, out) {
  console.log(err || out);
})

// Or for long running commands, use the spawn method:

ocelot.spawn_as('deploy', 'tail', ['-f', '/var/log/nginx/access.log'], function(err, child) {

  child.stdout.on('data', function(chunk) {
    console.log(chunk.toString());
  })

  setTimeout(function() {
    child.kill();
  }, 5000);

})

Author

Written by Tomas Pollak. MIT.

0.0.5

9 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago