ports/databases/cassandra/files/repaircluster.in
Ruslan Makhmatkhanov c5b06623f8 - update to 1.0.6
- stop using kill-9
- support for cqlsh

While i'm here, fix plist and some whitespace issues.

PR:		163295
Submitted by:	Radim Kolar <hsn at sendmail dot cz>
Approved by:	maintainer (timeout, 3 weeks+)
2012-01-09 07:02:24 +00:00

12 lines
275 B
Bash

#! /bin/sh
set -e
PATH=/bin:/usr/bin:%%LOCALBASE%%/bin:%%PREFIX%%/bin
NODETOOL=%%DATADIR%%/bin/nodetool
if test $# -eq 0; then
echo "$0 <any node in cluster>"
exit 1;
fi
for i in `$NODETOOL -h $1 ring | cut -d ' ' -f 1 | grep -e '^[0-9]'`; do
$NODETOOL -h $i repair
done