File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,10 @@ def asbool(s):
78
78
TIMEZONE = os .getenv ("TIMEZONE" )
79
79
if TIMEZONE :
80
80
answers ["portal_timezone" ] = TIMEZONE
81
+ ADDITIONAL_PROFILES = os .getenv ("PROFILES" , os .getenv ("ADDITIONAL_PROFILES" , "" ))
82
+ additional_profiles = []
83
+ if ADDITIONAL_PROFILES :
84
+ additional_profiles = [profile .strip () for profile in ADDITIONAL_PROFILES .split ("," )]
81
85
82
86
# Get the final site_id and distribution from the updated answers.
83
87
site_id = answers ["site_id" ]
@@ -104,3 +108,10 @@ def asbool(s):
104
108
transaction .commit ()
105
109
app ._p_jar .sync ()
106
110
logger .info (" - Site created!" )
111
+
112
+ if additional_profiles :
113
+ for profile_id in additional_profiles :
114
+ logger .info (f" - Importing profile { profile_id } " )
115
+ site .portal_setup .runAllImportStepsFromProfile (f"profile-{ profile_id } " )
116
+ transaction .commit ()
117
+ app ._p_jar .sync ()
You can’t perform that action at this time.
0 commit comments