#!/usr/bin/python2 #simple program to check if mythbackend is up and running #exit code of 0 is success, anything else means it can't connect import sys class Logger(object): def __init__(self, filename="/tmp/Default.log"): #self.terminal = sys.stdout self.log = open(filename, "a") def write(self, message): #self.terminal.write(message) self.log.write(message) sys.stdout = Logger("/tmp/be_check.log") from MythTV import MythBE,MythDB #import datetime,time,sys,subprocess try: be=MythBE() db = MythDB() except: sys.exit(1) sys.exit(0)