etc/scripts/rhq48-storage-patch/rhq48-storage-patch.sh | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
New commits:
commit d1f030ca0033ce7d7a7ea4ab223214789118de99
Author: John Sanda <jsanda(a)redhat.com>
Date: Wed Jul 10 10:48:16 2013 -0400
add some basic argument validation
The script now takes as arguments the rhq server directory, the ip address of
the storage node, the cql port, and the jmx port.
diff --git a/etc/scripts/rhq48-storage-patch/rhq48-storage-patch.sh
b/etc/scripts/rhq48-storage-patch/rhq48-storage-patch.sh
index 756ba20..947155f 100755
--- a/etc/scripts/rhq48-storage-patch/rhq48-storage-patch.sh
+++ b/etc/scripts/rhq48-storage-patch/rhq48-storage-patch.sh
@@ -1,14 +1,23 @@
#!/bin/bash
-if [ "x$1" = "x" ]; then
- echo "Usage: $0 <rhq-server-dir>"
+function usage() {
+ echo "Usage: $0 <rhq-server-dir> <storage-ip-address> <cql-port>
<jmx-port>"
+}
+
+if [ $# -ne 4 ]; then
+ usage
+ exit 1
+fi
+
+if [[ "x$1" = "x" ]] || [[ "x$2" = "x" ]] || [[
"x$3" = "x" ]] || [[ "x$4" = "x" ]]; then
+ usage
exit 1
fi
RHQ_SERVER_DIR=$1
CQL_HOSTNAME=$2
-CQL_PORT=9142
-JMX_PORT=7299
+CQL_PORT=$3
+JMX_PORT=$4
PATCH="apache-cassandra-1.2.4-patch-1.jar"
Show replies by date