diff options
Diffstat (limited to 'java/broker/bin/qpid.stopall')
-rwxr-xr-x | java/broker/bin/qpid.stopall | 49 |
1 files changed, 1 insertions, 48 deletions
diff --git a/java/broker/bin/qpid.stopall b/java/broker/bin/qpid.stopall index d71f591de8..b0ad506629 100755 --- a/java/broker/bin/qpid.stopall +++ b/java/broker/bin/qpid.stopall @@ -24,51 +24,4 @@ # Utilises qpid.stop to perform the actual stopping # -PROGRAM="DQPID" - -# -# grep ps for instances of $PROGRAM and collect PIDs -# -lookup() -{ -#pids=`ps o pid,command | grep $PROGRAM | grep -v grep | cut -d ' ' -f 1` -pids=`ps -ef |grep $USER | grep $PROGRAM | grep -v grep | awk '{print $2}'` -result=`echo -n $pids | wc -w` -} - - -# -# Show the PS output for given set of pids -# -showPids() -{ -ps -o user,pid,args -p $pids -} - - -# -# Main Run -# - -lookup - -if [[ $[$result] == 0 ]] ; then - echo "No Qpid Brokers found running under user '$USER'" - exit 0 -fi - -for pid in $pids ; do - -qpid.stop $pid - -done - -# Check we have quit all -lookup - -if [[ $[$result] == 0 ]] ; then - echo "All Qpid brokers successfully quit" -else - echo "Some brokers were not quit" - showPids $pids -fi +qpid.stop $* |