blob: 84db3401ba7aa20779a4a8f6a76cfaf39022a19d [file] [log] [blame]
#!/bin/bash
# -----------------------------------------------------------------------------
# Remotely stops & uninstalls ONOS on the specified node.
# -----------------------------------------------------------------------------
[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
. $ONOS_ROOT/tools/build/envDefaults
remote=$ONOS_USER@${1:-$OCI}
ssh -t $remote "
sudo service onos stop 1>/dev/null 2>/dev/null
sudo rm -fr $ONOS_INSTALL_DIR
"