diff --git a/slapos/recipe/maarch/configuration.py b/slapos/recipe/maarch/configuration.py index c202f2c64b2ca7fbc56e31f7519cbbd5ca93fc92..7d6b6e3e5f23623a4989606322d43984243397e0 100644 --- a/slapos/recipe/maarch/configuration.py +++ b/slapos/recipe/maarch/configuration.py @@ -96,6 +96,10 @@ class Recipe(GenericBaseRecipe): config_xml_default = os.path.join(folder, 'config.xml.default') config_xml = os.path.join(folder, 'config.xml') + # do not overwrite the config.xml file (it can be customized inside the application) + if os.path.exists(config_xml): + return + content = open(config_xml_default, 'rb').read() xml = lxml.etree.fromstring(content) @@ -121,6 +125,10 @@ class Recipe(GenericBaseRecipe): config_xml_default = os.path.join(folder, 'config.xml.default') config_xml = os.path.join(folder, 'config.xml') + # do not overwrite the config.xml file (it can be customized inside the application) + if os.path.exists(config_xml): + return + content = open(config_xml_default, 'rb').read() xml = lxml.etree.fromstring(content) @@ -168,6 +176,12 @@ class Recipe(GenericBaseRecipe): cur = conn.cursor() + # skip everything if the tables have already been created + cur.execute("SELECT 1 FROM information_schema.tables WHERE table_schema='public' AND table_name='docservers';") + if cur.rowcount == 1: + conn.close() + return + htdocs = options['htdocs'] # load the schema