123456789101112131415161718 |
- #!/usr/bin/expect
- spawn scp -r /var/lib/jenkins/workspace/mkcloud-back-end/target/renren-fast.jar root@10.168.57.12:/home/mkcloud
- expect "*: "
- send "root\r"
- expect eof
- spawn ssh root@10.168.57.12
- expect "*: "
- send "root\r"
- interact
- send "cd /home/mkcloud\r"
- send "mv renren-fast.jar mkcloud-new.jar\r"
- send "lsof -i:8085| awk 'NR==2' | awk '{print $2}'\r"
- send "if [ ! -n \"$PID\" ]; then echo \"There are no processes running on 8085\" else echo \"NOT NULL\" fi"
- expect eof
|