Changed to use start-zk.sh to start zookeeper (also modified README.md)
diff --git a/README.md b/README.md
index b10188e..8c0cc0a 100644
--- a/README.md
+++ b/README.md
@@ -31,12 +31,14 @@
1. Start zookeeper
- $ cd (ZOOKEEPER-INSTALL-DIR)/bin
-
- $ ./zkServer.sh start
+ $ cd (ONOS-INSTALL-DIR)/
+
+ $ ./start-zk.sh
2. Start cassandra
+ $ cd (ONOS-INSTALL-DIR)/
+
$ ./start-cassandra.sh start
1. Confirm cassandra is running
@@ -58,8 +60,8 @@
1. Start Zookeeper
- $ cd (ZOOKEEPER-INSTALL-DIR)/bin
-
+ $ cd (ONOS-INSTALL-DIR)/
+
$ ./zkServer.sh start
2. Start ONOS and Cassandra embedded
diff --git a/start-zk.sh b/start-zk.sh
new file mode 100755
index 0000000..26db2fa
--- /dev/null
+++ b/start-zk.sh
@@ -0,0 +1,45 @@
+#!/bin/bash
+# Set paths
+
+ONOS_HOME=`dirname $0`
+ZK_DIR=${HOME}/zookeeper-3.4.5
+ZK_CONF=${ONOS_HOME}/conf/zoo.cfg
+
+function start {
+ # Run Zookeeper with our configuration
+ echo "Starting Zookeeper"
+ $ZK_DIR/bin/zkServer.sh start $ZK_CONF
+}
+
+function stop {
+ # Kill the existing processes
+ pids=`jps -l | grep org.apache.zookeeper.server | awk '{print $1}'`
+ for p in ${pids}; do
+ if [ x$p != "x" ]; then
+ kill -KILL $p
+ echo "Killed existing prosess (pid: $p)"
+ fi
+ done
+}
+function status {
+ $ZK_DIR/bin/zkServer.sh status $ZK_CONF
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ status)
+ status
+ ;;
+ restart)
+ stop
+ start
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart|status}"
+ exit 1
+esac