blob: a535c0ae87767f299c792fe203723b9b87f29319 [file] [log] [blame]
#!/bin/bash
#-------------------------------------------------------------------------------
# Remotely stops & uninstalls ONOS.
#-------------------------------------------------------------------------------
[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
. $ONOS_ROOT/tools/build/envDefaults
remote=$ONOS_USER@${1:-$OCI}
ssh $remote "
[ -f $ONOS_INSTALL_DIR/bin/onos ] && \
$ONOS_INSTALL_DIR/bin/onos halt 2>/dev/null
sudo rm -fr $ONOS_INSTALL_DIR
"