[root@backup testlog]# more xian.sh
#!/bin/bash
name=117.34.70.2
if nc -z -w5 $name 80 ;then echo $(date +%Y%m%d-%H%M%S) "$name 80 port is ok" >>/root/testlog/xian.log; else curl
er80porterrror; fi
if nc -z -w5 $name 8080 ;then echo $(date +%Y%m%d-%H%M%S) "$name 8080 port is ok" >>/root/testlog/xian.log; else curl
server8080porterrror; fi
阅读(389) | 评论(0) | 转发(0) |