Print warning instead of error if group 'dovecot' does not exist.
This commit is contained in:
parent
25d0925d06
commit
c37da29142
@ -2319,6 +2319,10 @@ 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
|
else
|
||||||
|
if ! $(grep dovecot /etc/group > /dev/null) ; then
|
||||||
|
echo_skipped
|
||||||
|
warn "Group 'dovecot' not present.!"
|
||||||
|
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
|
||||||
echo_ok
|
echo_ok
|
||||||
@ -2326,6 +2330,7 @@ else
|
|||||||
echo_failed
|
echo_failed
|
||||||
error "$(cat $log_file)"
|
error "$(cat $log_file)"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user