diff options
Diffstat (limited to 'mail/postfix24/pkg-install')
-rw-r--r-- | mail/postfix24/pkg-install | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mail/postfix24/pkg-install b/mail/postfix24/pkg-install index 5acdbac8d974..1ef1fb5b2089 100644 --- a/mail/postfix24/pkg-install +++ b/mail/postfix24/pkg-install @@ -81,6 +81,20 @@ if [ x"$2" = xPRE-INSTALL ]; then exit 1 fi fi + + if /usr/sbin/pw show group mail | grep -q "${USER}" 2>/dev/null; then + echo "You already have user \"${USER}\" in group \"mail\", so I will use it." + else + echo "You need user \"${USER}\" added to group \"mail\"." + if yesno "Would you like me to add it" y; then + /usr/sbin/pw groupmod mail -m ${USER} || exit + echo "Done." + else + echo "Please create it, and try again." + exit 1 + fi + fi + fi if [ x"$2" = xPOST-INSTALL ]; then |