Update file run_onchange_before_20-ensure-user-group.sh.tmpl

This commit is contained in:
Brian Zalewski 2023-04-19 07:11:19 +00:00
parent 87414c9d63
commit 62ed0d317c

View file

@ -8,6 +8,8 @@
{{ includeTemplate "universal/profile-before" }}
{{ includeTemplate "universal/logg-before" }}
if [ -n "$USER" ]; then
logg info "Adding the $USER user to the $USER group"
### Ensure user has group of same name (required for Macports)
logg info "Ensuring user ($USER) has a group with the same name ($USER) and that it is a member. Sudo privileges may be required"
@ -41,4 +43,7 @@ fi
### Add user to group
sudo dseditgroup -o edit -t user -a $USERNAME $GROUP
else
logg warn 'The USER environment variable is unavailable'
fi
{{ end -}}