#!/usr/bin/env python import os,subprocess,socket,time,sys from urllib import urlencode from socket import gethostname def check_port(): port = [8091,8080] failed_port = [] for _each_port in port: #print i try: sk = socket.socket(socket.AF_INET, sock…