#!/usr/local/bin/python # ping every 5 secs to keep vpn connection alive import time import subprocess while True: ping_response = subprocess.Popen( ["ping", "-c1", "-W100", "jenkins.theorchard.com"], stdout=subprocess.PIPE).stdout.read() print(ping_response) time.sleep(5)