Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. #! /usr/bin/python3
  2. import subprocess
  3. from os import system as system_call
  4. import time
  5.  
  6. print("autoReconnect running")
  7. while(True):
  8. a = system_call("ping -c1 -w1 8.8.8.8 > /dev/null")
  9. if a != 0:
  10. system_call("./reconnect.sh")
  11. time.sleep(1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement