#!/bin/sh

echo "Shutting down cdq"
pid_list="$(ps aux | grep cdq/app | grep -v grep | awk '{print $2}')"
if test -z $pid_list ; then
	echo "cdq is not running"
else
	for pid in $pid_list;  
	do  
	if kill -0 "$pid" 2>/dev/null; then
		echo "kill pid $pid"
		kill -9 $pid
	fi
	done  
fi

exit 0
