diff --git a/webhooks.py b/webhooks.py index 36d29d0..f84ac3c 100644 --- a/webhooks.py +++ b/webhooks.py @@ -13,9 +13,18 @@ app = Flask(__name__) # setup the environment SNAP_USER_DATA = os.environ.get('SNAP_USER_DATA') +CONFIG_FILE = os.environ.get('CONFIG_FILE') +LOG_FILE = os.environ.get('LOG_FILE') if SNAP_USER_DATA is None: - filename = 'config.yaml' - log_file = 'webhook.log' + if CONFIG_FILE is None: + filename = 'config.yaml' + else: + filename = CONFIG_FILE + + if LOG_FILE is None: + log_file = 'webhook.log' + else: + log_file = LOG_FILE else: filename = SNAP_USER_DATA + '/config.yaml' log_file = SNAP_USER_DATA + '/webhook.log'