Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- IP="172.22.0.100"
- LOGIN="antik"
- while [ 1 ]; do
- ip="172.22.0.100"
- if [ $(ping -c 3 $IP | grep -c '0% packet loss') == 1 ]; then
- ssh $LOGIN@$IP;
- echo "DISCONNECT";
- fi
- echo "RECONNECT...";
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement