Browse Source

iguana pkill osx

all-modes
pbca26 8 years ago
parent
commit
1fb401270f
  1. 9
      main.js

9
main.js

@ -38,7 +38,14 @@ var shepherd = require('./routes/shepherd'),
appConfig = shepherd.loadLocalConfig(); // load app config
if (appConfig.killIguanaOnStart) {
exec('ps -p $(pidof iguana)', function(error, stdout, stderr) {
var iguanaGrep;
if (os.platform() === 'darwin') {
iguanaGrep = "ps -p $(ps -A | grep -m1 iguana | awk '{print $1}')";
}
if (os.platform() === 'linux') {
iguanaGrep = 'ps -p $(pidof iguana)';
}
exec(iguanaGrep, function(error, stdout, stderr) {
if (stdout.indexOf('iguana') > -1) {
console.log('found another iguana process(es)');
exec('pkill iguana', function(error, stdout, stderr) {

Loading…
Cancel
Save