procName="startCANLog.sh"
procesy="`ps -fe 2>/dev/null`";
if [ $? -eq 0 ]; then
	echo "Not a busybox shell" >&2;
	for proc in `echo "${procesy}" | grep "${procName}" | awk '{print $2}' | head -n -1`; do
		kill -TERM -$proc 2>/dev/null
	done
else
	echo "Busybox shell" >&2;
	#busybox
	procesy="`ps`";
	procCount="`echo "${procesy}" | grep "${procName}" | wc -l`";
	procCount=`expr ${procCount} - 1`;
	echo "Killing the load processes."
	for proc in `echo "${procesy}" | grep "${procName}" | awk '{print $1}' | head -n ${procCount}`; do
		kill -TERM -$proc 2>/dev/null
	done
fi
