0001-hobo-deploy-always-look-for-a-default.zip-skeleton-6.patch
wcs/ctl/check_hobos.py | ||
---|---|---|
162 | 162 |
print('initializing instance in', tenant_app_dir) |
163 | 163 |
os.mkdir(tenant_app_dir) |
164 | 164 |
pub.set_tenant_by_hostname(self.get_instance_path(service.get('base_url'))) |
165 |
skeleton_filenames = ['default.zip'] |
|
165 | 166 |
if service.get('template_name'): |
166 |
skeleton_filepath = os.path.join(
|
|
167 |
global_app_dir, 'skeletons', service.get('template_name')
|
|
168 |
) |
|
167 |
skeleton_filenames.append(service.get('template_name'))
|
|
168 |
for skeleton_filename in reversed(skeleton_filenames):
|
|
169 |
skeleton_filepath = os.path.join(global_app_dir, 'skeletons', skeleton_filename)
|
|
169 | 170 |
if os.path.exists(skeleton_filepath): |
170 | 171 |
with open(skeleton_filepath, 'rb') as fd: |
171 | 172 |
pub.import_zip(fd) |
173 |
break |
|
172 | 174 |
new_site = True |
173 | 175 | |
174 | 176 |
else: |
175 |
- |