tom | 5c25570 | 2014-09-18 06:57:39 -0700 | [diff] [blame^] | 1 | #!/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 | |
| 9 | remote=$ONOS_USER@${1:-$OCI} |
| 10 | |
| 11 | ssh $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 | " |