aboutsummaryrefslogtreecommitdiffstats
path: root/framework/src/onos/tools/test/bin/onos-uninstall
blob: c04db7ac53892756a4fdb9814be0825b1a4acae2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/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 $remote "
    sudo stop onos 1>/dev/null 2>/dev/null
    sudo rm -fr $ONOS_INSTALL_DIR
"