From bbb4ec41172f4cf4b70dca89fdac307dcafdacf4 Mon Sep 17 00:00:00 2001 From: kakwa Date: Thu, 28 May 2015 00:17:59 +0200 Subject: [PATCH] adding a check to avoid removing previous configuration in setup.py --- setup.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index e8159b0..565b047 100755 --- a/setup.py +++ b/setup.py @@ -73,10 +73,13 @@ def get_list_files(basedir, targetdir): return_list.append((os.path.join(targetdir, subpath), files_list)) return return_list +# add static files and templates in the list of thing to deploy resources_files = get_list_files('resources', os.path.join(datarootdir, 'share', 'ldapcherry')) -resources_files.append(( +# add the configuration files if they don't exist +if not os.path.exists(os.path.join(sysconfdir, 'ldapcherry')): + resources_files.append(( os.path.join(sysconfdir, 'ldapcherry'), [ 'conf/ldapcherry.ini', 'conf/attributes.yml', 'conf/roles.yml'] ))