#!/bin/bash
num=`ps aux | grep '/mnt/html/www/export/wms/auto/productbeianCheck.php' | grep -v grep | wc -l`
if [[ $num -gt 0 ]];then
	echo 'productbeianCheck proccess is running'
	exit
else
	lockfile='/mnt/html/www/export/wms/data/log/productbeianCheck.lock'
		if [[ ! -f "$lockfile" ]];then
			php /mnt/html/www/export/wms/auto/productbeianCheck.php >> /mnt/html/www/export/wms/data/log/productbeianCheck201502.log
		else
			rm -f $lockfile
			php /mnt/html/www/export/wms/auto/productbeianCheck.php >> /mnt/html/www/export/wms/data/log/productbeianCheck201502.log
		fi
fi
exit 0