Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add an easy-to-use executable

  • Loading branch information...
commit 9f3e7dd65df45860b3f24519560ead5ea6b80989 1 parent 91025c1
@fizx fizx authored
Showing with 28 additions and 0 deletions.
  1. +28 −0 bin/rowz
View
28 bin/rowz
@@ -0,0 +1,28 @@
+#!/bin/sh
+set -e
+if [ $# -lt 1 ]; then
+ echo
+ echo "This runs a Rowz server in the foreground, suitable for experimentation"
+ echo
+ echo "Usage: $0 MYSQL_USER [MYSQL_PASSWORD]"
+ echo
+ exit 1
+fi
+
+cd `dirname $0`/..
+
+echo | mysql -u "$1" --password="$2" rowz_nameserver
+if [ $? -eq 1 ]; then
+ echo "Before running, you need to create a mysql database and:"
+ echo "mysql> CREATE DATABASE rowz_nameserver;"
+ exit 1
+fi
+
+if [ ! -f dist/rowz/rowz-1.0.jar ]; then
+ echo "You need to build rows first. Try: "
+ echo "ant dist -DDB_USERNAME=fixme -DDB_PASSWORD=fixmetoo"
+ exit 1
+fi
+
+echo "Starting rowz (it's kinda quiet at the moment)"
+java -DDB_USERNAME="$1" -DDB_PASSWORD="$2" -jar dist/rowz/rowz-1.0.jar -f config/development.conf
Please sign in to comment.
Something went wrong with that request. Please try again.