Deleted unnescessary mbean registration
[voldemort/jeffpc.git] / bin / voldemort-stop.sh
blob5d855bf9cdf4cd1241ce66a69a8aa92b83c766bd
1 #!/bin/bash
4 # Copyright 2008-2009 bebo, Inc
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
19 usage="Usage: voldemort-stop.sh"
21 bin=`dirname "$0"`
22 bin=`cd "$bin"; pwd`
24 if [ "$#" != "0" ]
25 then
26 echo $usage
27 exit 1
30 pids=`ps xwww | grep voldemort.server.VoldemortServe[r] | awk '{print $1}'`
32 if [ "$pids" != "" ]
33 then
34 echo $(hostname)': Stopping Voldemort...'
35 kill $pids
36 exit 0
37 fi
39 echo $(hostname)': Voldemort Server not running!'
40 exit 1