X-Git-Url: http://git.treefish.org/~alex/mtxbot.git/blobdiff_plain/a6f58518069909db7b170ad374b13328986b98da..68e819a04d93ac687e72ec02cc24f8b78bebb055:/src/mtxbot.py?ds=inline diff --git a/src/mtxbot.py b/src/mtxbot.py index d92dcdc..722c8db 100755 --- a/src/mtxbot.py +++ b/src/mtxbot.py @@ -61,10 +61,12 @@ if len(sys.argv) != 2: with open(sys.argv[1]) as configFile: config = json.load(configFile) +fifo_dir = os.getenv('MTXBOT_FIFO_DIR', '/run/mtxbot') + 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) )