Advertisement
Guest User

antik

a guest
Feb 8th, 2011
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.22 KB | None | 0 0
  1. #!/bin/bash
  2. IP="172.22.0.100"
  3. LOGIN="antik"
  4. while [ 1 ]; do
  5. ip="172.22.0.100"
  6. if [ $(ping -c 3 $IP | grep -c '0% packet loss') == 1 ]; then
  7.         ssh $LOGIN@$IP;
  8.         echo "DISCONNECT";
  9. fi
  10. echo "RECONNECT...";
  11. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement