CORD-3162 split exampleservice config files
Change-Id: I678f998e39321ba6f6249e2a560972338cfdd020
diff --git a/xos/synchronizer/exampleservice-synchronizer.py b/xos/synchronizer/exampleservice-synchronizer.py
index 2548f7c..06fea1b 100644
--- a/xos/synchronizer/exampleservice-synchronizer.py
+++ b/xos/synchronizer/exampleservice-synchronizer.py
@@ -16,15 +16,20 @@
#!/usr/bin/env python
-# Runs the standard XOS synchronizer
+# ExampleService Synchronizer. This loads the config file and starts the synchronizer
import importlib
import os
import sys
from xosconfig import Config
-config_file = os.path.abspath(os.path.dirname(os.path.realpath(__file__)) + '/exampleservice_config.yaml')
-Config.init(config_file, 'synchronizer-config-schema.yaml')
+base_config_file = os.path.abspath(os.path.dirname(os.path.realpath(__file__)) + '/config.yaml')
+mounted_config_file = os.path.abspath(os.path.dirname(os.path.realpath(__file__)) + '/mounted_config.yaml')
+
+if os.path.isfile(mounted_config_file):
+ Config.init(base_config_file, 'synchronizer-config-schema.yaml', mounted_config_file)
+else:
+ Config.init(base_config_file, 'synchronizer-config-schema.yaml')
synchronizer_path = os.path.join(os.path.dirname(
os.path.realpath(__file__)), "../../synchronizers/new_base")