1
0
mirror of https://github.com/kakwa/ldapcherry synced 2024-11-25 18:54:29 +01:00

adding a check to avoid removing previous configuration in setup.py

This commit is contained in:
kakwa 2015-05-28 00:17:59 +02:00
parent 55e71960f7
commit bbb4ec4117

View File

@ -73,9 +73,12 @@ def get_list_files(basedir, targetdir):
return_list.append((os.path.join(targetdir, subpath), files_list)) return_list.append((os.path.join(targetdir, subpath), files_list))
return return_list return return_list
# add static files and templates in the list of thing to deploy
resources_files = get_list_files('resources', resources_files = get_list_files('resources',
os.path.join(datarootdir, 'share', 'ldapcherry')) os.path.join(datarootdir, 'share', 'ldapcherry'))
# add the configuration files if they don't exist
if not os.path.exists(os.path.join(sysconfdir, 'ldapcherry')):
resources_files.append(( resources_files.append((
os.path.join(sysconfdir, 'ldapcherry'), os.path.join(sysconfdir, 'ldapcherry'),
[ 'conf/ldapcherry.ini', 'conf/attributes.yml', 'conf/roles.yml'] [ 'conf/ldapcherry.ini', 'conf/attributes.yml', 'conf/roles.yml']