blob: 19cb4118c5508eba74e32a8af28571443f4b2ccf [file] [log] [blame]
tom5ca34372014-09-19 17:43:41 -07001#!/bin/bash
2#-------------------------------------------------------------------------------
3# Remotely configures & starts ONOS for the first time.
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
tom0768a022014-09-24 16:16:16 -070011ssh $remote "
12 sudo perl -pi.bak -e \"s/ <interface>.*</ <interface>${ONOS_NIC:-192.168.56.*}</g\" \
13 $ONOS_INSTALL_DIR/$KARAF_DIST/etc/hazelcast.xml
tom16555622014-09-29 08:49:27 -070014 echo \"onos.ip=\$(ifconfig | grep $ONOS_NIC | cut -d: -f2 | cut -d\\ -f1)\" >> $ONOS_INSTALL_DIR/$KARAF_DIST/etc/system.properties
tom0768a022014-09-24 16:16:16 -070015"