-
-
Save shadeglare/9032825 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* c9.io kill active node process */ | |
(function(){ | |
"use strict"; | |
var exec = require('child_process').exec, | |
lCmd = 'kill -9' + ' ' + /* kill finded process */ | |
'`ps ax' + '|' + /* show all process */ | |
'grep node-openshift' + '|' + /* find node-openshift */ | |
'grep -v grep' + '|' + /* exlude grep command */ | |
'awk "{print $1}"`'; /* show first collumn */ | |
exec(lCmd, function(error, stdout, stderr){ | |
console.log(error || stdout || stderr); | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment