blob: 2a547573c6e8b2e09f30d4ebf197f13e74408e94 [file] [log] [blame]
tom5c255702014-09-18 06:57:39 -07001#!/bin/bash
2#-------------------------------------------------------------------------------
3# Remotely install & starts ONOS.
4#-------------------------------------------------------------------------------
5
6[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
7. $ONOS_ROOT/tools/build/envDefaults
8
9remote=$ONOS_USER@${1:-$OCI}
10
11ssh $remote "
12 [ -d $ONOS_INSTALL_DIR ] && echo \"ONOS is already installed\" && exit 1
13
14 sudo mkdir $ONOS_INSTALL_DIR && sudo chown sdn:sdn $ONOS_INSTALL_DIR
15 tar zxmf /tmp/$ONOS_BITS.tar.gz -C $ONOS_INSTALL_DIR --strip-components=1
16
17"