]> git.treefish.org Git - mtxbot.git/blobdiff - src/mtxbot.py
use b64 encoding
[mtxbot.git] / src / mtxbot.py
index d92dcdc2e2dd95368ee8e9ccf10a2bf87d9f470a..722c8dbb40097d514e70f61ce4da5147b8e12d95 100755 (executable)
@@ -61,10 +61,12 @@ if len(sys.argv) != 2:
 with open(sys.argv[1]) as configFile:
     config = json.load(configFile)
 
 with open(sys.argv[1]) as configFile:
     config = json.load(configFile)
 
+fifo_dir = os.getenv('MTXBOT_FIFO_DIR', '/run/mtxbot')
+
 while not stop:
     presences = []
 while not stop:
     presences = []
-    for entry in os.listdir(config['paths']['fifodir']):
-        fullpath = "%s/%s" % (config['paths']['fifodir'], entry)
+    for entry in os.listdir(fifo_dir):
+        fullpath = "%s/%s" % (fifo_dir, entry)
         if stat.S_ISFIFO(os.stat(fullpath).st_mode):
             logging.info("Creating presence for %s..." % entry)
             presences.append( Presence(entry, fullpath) )
         if stat.S_ISFIFO(os.stat(fullpath).st_mode):
             logging.info("Creating presence for %s..." % entry)
             presences.append( Presence(entry, fullpath) )