#!/bin/bash
export PATH="$PATH":/usr/local/bin
filepre="/data1/www/htdocs/xxx.xxx.xxx/system/"
filename=("sendbadge.php" "sendcache.php" "sendmail.php" "sendnotice.php" "sendweibo.php")
logname=("testsendbadge.log" "testsendcache.log" "testsendmail.log" "testsendnotice.log" "testsendweibo.log")
count=${#filename[@]}
i=0
for((i=0;i<"$count";i++))
do
filephp=${filepre}${filename[i]}
filelog=/tmp/${logname[i]}
if test $( pgrep -f "php ${filephp}" | wc -l )
then nohup php ${filephp} >> ${filelog} &
fi
done