mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
12 lines
No EOL
350 B
Bash
Executable file
12 lines
No EOL
350 B
Bash
Executable file
kill -9 `ps ax|grep node-openshift|grep -v grep|awk '{print $1}'`
|
|
# print finded process
|
|
ProcessList=`ps ax|grep node-openshift`
|
|
echo $ProcessList
|
|
# getting pid of process
|
|
PID=`echo "${ProcessList}"|grep -v grep|awk '{print $1}'`
|
|
echo $PID
|
|
#kill it
|
|
if test ! $PID
|
|
then echo 'process not found'
|
|
else kill -9 $PID && echo 'killed process'
|
|
fi |