Print warning instead of error if group 'dovecot' does not exist.

This commit is contained in:
Christoph 2021-04-19 01:43:02 +02:00
parent 25d0925d06
commit c37da29142

View File

@ -2318,6 +2318,10 @@ fi
echononl "\tAdd Apache User (${HTTP_USER}) to group 'dovecot'.." 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 if getent group dovecot 2> /dev/null | grep -q "\b${HTTP_USER}\b" > /dev/null 2>&1 ; then
echo_skipped echo_skipped
else
if ! $(grep dovecot /etc/group > /dev/null) ; then
echo_skipped
warn "Group 'dovecot' not present.!"
else else
usermod -a -G dovecot $HTTP_USER > $log_file 2>&1 usermod -a -G dovecot $HTTP_USER > $log_file 2>&1
if [[ $? -eq 0 ]] ; then if [[ $? -eq 0 ]] ; then
@ -2327,6 +2331,7 @@ else
error "$(cat $log_file)" error "$(cat $log_file)"
fi fi
fi fi
fi
# - After finished, you must alos change the value of $CONF['configured'] # - After finished, you must alos change the value of $CONF['configured']