Update TestON cleanup script
- Update the way we stops the ssh process, previously we are trying to grep
"ssh -X" but we are actually running ssh with "ssh -t -X...." which means
we cannot find it
- Add one command to stop kubectl since we may create many port forwarding
process with it.
Change-Id: I7c274cb2db2d99c2cf4e6cef4bc76591265b4ca4
diff --git a/TestON/bin/cleanup.sh b/TestON/bin/cleanup.sh
index 4810002..571b0c9 100755
--- a/TestON/bin/cleanup.sh
+++ b/TestON/bin/cleanup.sh
@@ -25,10 +25,11 @@
# TODO: Add help to this file, and some more options?
# Maybe kill/uninstall ONOS?
-sudo kill -9 `ps -ef | grep "./cli.py" | grep -v grep | awk '{print $2}'`
-sudo kill -9 `ps -ef | grep "bin/teston" | grep -v grep | awk '{print $2}'`
-sudo kill -9 `ps -ef | grep "ssh -X" | grep -v grep | awk '{print $2}'`
-sudo kill -9 `ps ax | grep '[p]ython -m SimpleHTTPServer 8000' | awk '{print $1}'`
+sudo kill -9 `ps -ef | grep "./cli.py" | grep -v grep | awk '{print $2}'` &> /dev/null
+sudo kill -9 `ps -ef | grep "bin/teston" | grep -v grep | awk '{print $2}'` &> /dev/null
+sudo kill -9 `ps -ef | grep "/usr/bin/ssh" | grep -v grep | awk '{print $2}'` &> /dev/null
+sudo kill -9 `ps ax | grep '[p]ython -m SimpleHTTPServer 8000' | awk '{print $1}'` &> /dev/null
+sudo kill -9 `ps ax | grep 'kubectl' | awk '{print $2}'` &> /dev/null
export user=${ONOS_USER:-$USER}
if [[ -z "${OCN}" ]]; then