diff --git a/install_postfixadmin.sh b/install_postfixadmin.sh index 69285fb..b12fb23 100755 --- a/install_postfixadmin.sh +++ b/install_postfixadmin.sh @@ -2319,12 +2319,17 @@ echononl "\tAdd Apache User (${HTTP_USER}) to group 'dovecot'.." if getent group dovecot 2> /dev/null | grep -q "\b${HTTP_USER}\b" > /dev/null 2>&1 ; then echo_skipped else - usermod -a -G dovecot $HTTP_USER > $log_file 2>&1 - if [[ $? -eq 0 ]] ; then - echo_ok + if ! $(grep dovecot /etc/group > /dev/null) ; then + echo_skipped + warn "Group 'dovecot' not present.!" else - echo_failed - error "$(cat $log_file)" + usermod -a -G dovecot $HTTP_USER > $log_file 2>&1 + if [[ $? -eq 0 ]] ; then + echo_ok + else + echo_failed + error "$(cat $log_file)" + fi fi fi