Skip to content

Commit

Permalink
Riaknostic section
Browse files Browse the repository at this point in the history
First commit
  • Loading branch information
jmshoffs0812 committed Dec 8, 2011
1 parent e7c24ef commit e861f9a
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions rel/files/riak-admin
Expand Up @@ -65,6 +65,15 @@ ERTS_PATH=$RUNNER_BASE_DIR/erts-$ERTS_VSN/bin
# Setup command to control the node
NODETOOL="$ERTS_PATH/escript $ERTS_PATH/nodetool $NAME_ARG $COOKIE_ARG"

# Riaknostic location
RIAKNOSTIC_LOC="$ERTS_PATH/../lib/riaknostic/riaknostic"

# Setup command to run riaknostic
RIAKNOSTIC="$ERTS_PATH/escript $RIAKNOSTIC_LOC -etc $RUNNER_ETC_DIR -base $RUNNER_BASE_DIR -user $RUNNER_USER"

# URL for Riaknostic download instructions
RIAKNOSTIC_URL="http://riaknostic.basho.com/"

# Check the first argument for instructions
case "$1" in
join)
Expand Down Expand Up @@ -385,6 +394,18 @@ case "$1" in
_ -> init:stop(1) \
end."

;;
diag)
shift

if [ -f "$RIAKNOSTIC_LOC" ]; then
$RIAKNOSTIC "$@"
else
echo "Riak diagnostics utility is not present!"
echo "Visit $RIAKNOSTIC_URL for instructions."
exit 1
fi

;;
*)
echo "Usage: $SCRIPT { join | leave | backup | restore | test | status | "
Expand Down

0 comments on commit e861f9a

Please sign in to comment.