aboutsummaryrefslogtreecommitdiffstats
path: root/framework/src/onos/tools/test/bin/onos-uninstall
diff options
context:
space:
mode:
Diffstat (limited to 'framework/src/onos/tools/test/bin/onos-uninstall')
-rwxr-xr-xframework/src/onos/tools/test/bin/onos-uninstall10
1 files changed, 10 insertions, 0 deletions
diff --git a/framework/src/onos/tools/test/bin/onos-uninstall b/framework/src/onos/tools/test/bin/onos-uninstall
index c04db7ac..7a8b9a5f 100755
--- a/framework/src/onos/tools/test/bin/onos-uninstall
+++ b/framework/src/onos/tools/test/bin/onos-uninstall
@@ -10,5 +10,15 @@ remote=$ONOS_USER@${1:-$OCI}
ssh $remote "
sudo stop onos 1>/dev/null 2>/dev/null
+
+ # Wait for onos to stop up to 5 seconds
+ for i in \$(seq 1 5); do
+ [ -z \"\$(ps -ef | grep karaf.jar | grep -v grep)\" ] && break
+ sleep 1
+ done
+ [ -z \"\$(ps -ef | grep karaf.jar | grep -v grep)\" ] || echo 'ONOS failed to stop.'
+
+ # Remove onos directory and init file
sudo rm -fr $ONOS_INSTALL_DIR
+ [ -f /etc/init/onos.conf ] && sudo rm /etc/init/onos.conf
"