weifeng1463
##############################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

  

分类:

技术点:

相关文章:

  • 2021-06-14
  • 2022-12-23
  • 2022-01-23
  • 2021-11-29
  • 2021-08-05
  • 2021-07-13
  • 2021-08-12
  • 2021-08-18
猜你喜欢
  • 2021-10-06
  • 2022-12-23
  • 2022-01-06
  • 2021-12-08
  • 2021-08-26
  • 2022-12-23
  • 2022-01-05
相关资源
相似解决方案