##############################Deploy ansible client shell########################
echo "start deploy ansible client shell"
ansible_DIR="/data/sh/"
rm -rf /data/sh/*
if [ ! -e $ansible_DIR ];then
mkdir -p $ansible_DIR
fi
cp -r $PACKAGE_DIR/adserver_update.sh /data/sh/
cp -r $PACKAGE_DIR/packetanal_update.sh /data/sh/
chmod +x /data/sh/*
if [ ! -e /root/.ssh/ ];then
mkdir -p /root/.ssh/
fi
authorized_keys=`cat /root/.ssh/authorized_keys |grep -c "iZbp170y8gvxoe01ml9e7aZ"`
if [ $authorized_keys -eq 0 ];then
cat >>/root/.ssh/authorized_keys <<EOF
ssh-rsa AAA*************************************bp170y8gvxoe01ml9e7aZ
EOF
fi