#!/bin/bash
#自动删服
#脚本路径
currDir=$(cd "$(dirname "$0")";pwd)
#echo $currDir
#配置文件路径
phone="17683789735"
#CONF_FILE="/data/ops/lyzt/RSYNC_DIR/script_dir/main.conf"
#. ${CONF_FILE}
PROJECT="lyzt"
currdate=$(date "+%Y-%m-%d %H:%M:%S")
curr_newtime=`date -d "$currdate" +%s` #获取当前时间的时间戳
#LIST=$CURRDIR/qingdang.list
#[ ! -f $LIST ] && touch $LIST
LIST="/data/ops/lyzt/K_U_DIR/shanfu.list"
THEAD_NUM=5
tmp_fifo_file="/tmp/$$.fifo"
mkfifo ${tmp_fifo_file}
exec 8<>${tmp_fifo_file}
rm -f ${tmp_fifo_file}
for((i=0;i<${THEAD_NUM};i++))
do
    echo ""
    done >&8


while read line
do
        SF_INFO=($line)
        read -u8
       {
           sh Main_Control.sh shanfu ${SF_INFO[0]} ${SF_INFO[1]} action
           #echo ${SF_INFO[0]},${SF_INFO[1]}
           echo >&8
       } &
done < $LIST
wait
exec 8>&-
exit 0