File tree Expand file tree Collapse file tree
ubuntu/16.04/usr/local/share/bootstrap Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,14 +24,20 @@ function update_permissions() {
2424 CODE_OWNER=" $APP_USER "
2525 export APP_USER
2626 export CODE_OWNER
27-
2827 if [[ " $group " = UNKNOWN ]]; then
2928 APP_GROUP=" $APP_USER "
3029 CODE_GROUP=" $APP_GROUP "
3130 export APP_GROUP
3231 export CODE_GROUP
3332 groupadd --system --gid " $group_id " " $APP_GROUP " || groupmod -g " $group_id " " $APP_GROUP "
33+ else
34+ APP_GROUP=" $group "
35+ CODE_GROUP=" $APP_GROUP "
36+ export APP_GROUP
37+ export CODE_GROUP
3438 fi
35- useradd --create-home --system --uid " $owner_id " --gid " $group_id " " $APP_USER " || usermod -u " $owner_id " " $APP_USER "
39+ useradd --create-home --system --uid " $owner_id " --gid " $group_id " " $APP_USER " || usermod -u " $owner_id " -g " $APP_GROUP " " $APP_USER "
40+ else
41+ echo " The user $owner with ID $owner_id already exists in the container. Nothing to do."
3642 fi
3743}
You can’t perform that action at this time.
0 commit comments