8 cat <<EOF
9 ********Please enter your choise:(0-1)********
10 (0) /root/.ssh:/root/.ssh
11 (1) /root/soft:/root/.ssh
12 EOF
13
14 read -p "your select:" input
15 case $input in
16 0)
17 key_dir=.ssh
18 ;;
19 1)
20 key_dir=soft
21 ;;
22 *)
23 exit
24 ;;
25 esac
26 echo ${key_dir}
27 curr_dir=`pwd`
28 file="${curr_dir}/ops.env"
29 echo $file
30 if [ ! -f "$file" ]
31 then
32 echo "file is not exist"
33 exit
34 fi
35 executor=`grep "RABBITMQ_LISTENER_QUEUE" ${file} |awk -F "=" '{print $2}'`
36 echo ${executor}
37 docker run -d -v /root/${key_dir}:/root/.ssh -v /data/aiopvolume/volume/${executor}:/glusterfs/aiop/${executor} -v /data/aiopvolume/volume/soft:/glusterfs/soft --env-file ops.env --name executor_ztedefault devops-snapshot-docker.artnj.zte.com.cn/aiop/python3-ansible-executor:v5.4 python3 executor_startup.py --module static_executor