mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-08-03 13:13:10 +00:00
added shell directory with shell files
This commit is contained in:
parent
fa1caadede
commit
d46c17d46a
11 changed files with 110 additions and 34 deletions
17
shell/kill.js
Normal file
17
shell/kill.js
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
/* 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);
|
||||
});
|
||||
|
||||
})();
|
||||
Loading…
Add table
Add a link
Reference in a new issue