diff --git a/robot_failover.py b/robot_failover.py index 5235561..efb867e 100755 --- a/robot_failover.py +++ b/robot_failover.py @@ -12,9 +12,15 @@ from base64 import b64encode from time import sleep -CONFIG_PATH = os.path.join(os.path.abspath( +CONFIG_PATH_DEV = os.path.join(os.path.abspath( os.path.dirname(__file__)), "config.json") +CONFIG_PATH = os.path.join(os.path.abspath( + "/etc/robot-failover"), "config.json") + +if os.path.isfile(CONFIG_PATH_DEV): + CONFIG_PATH = CONFIG_PATH_DEV + DEBUG = sys.stdout.isatty() FORCE_DEBUG = 'FORCE_DEBUG_FAILOVER' in os.environ