summaryrefslogtreecommitdiffstats
path: root/linhes/linhes-system/be_check.py
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2022-11-21 06:04:00 (GMT)
committerBritney Fransen <brfransen@gmail.com>2022-11-21 06:04:00 (GMT)
commitf5b1d6dd7ade04eddd4ce85856efb30ef1072466 (patch)
treed8f3bee26a22dc0988c1fc6ab6b276dfe676340c /linhes/linhes-system/be_check.py
parentebc4b78c66d1315d7a1a3412b74554de30ec4ddd (diff)
downloadlinhes_pkgbuild-f5b1d6dd7ade04eddd4ce85856efb30ef1072466.zip
linhes_pkgbuild-f5b1d6dd7ade04eddd4ce85856efb30ef1072466.tar.gz
linhes_pkgbuild-f5b1d6dd7ade04eddd4ce85856efb30ef1072466.tar.bz2
linhes-system: initial inclusion
Diffstat (limited to 'linhes/linhes-system/be_check.py')
-rwxr-xr-xlinhes/linhes-system/be_check.py35
1 files changed, 35 insertions, 0 deletions
diff --git a/linhes/linhes-system/be_check.py b/linhes/linhes-system/be_check.py
new file mode 100755
index 0000000..b5f7a64
--- /dev/null
+++ b/linhes/linhes-system/be_check.py
@@ -0,0 +1,35 @@
+#!/usr/bin/python
+#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
+ try:
+ self.log = open(filename, "a")
+ except:
+ pass
+
+ def write(self, message):
+ try:
+ #self.terminal.write(message)
+ self.log.write(message)
+ except:
+ pass
+
+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)