mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
Fix delmailuser error handling (#2181)
* Update delmailuser * it's ok, when 'sed -i' leaves a file unchanged Co-authored-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
This commit is contained in:
parent
2bc3e821fa
commit
54ee1e7567
|
@ -101,7 +101,7 @@ do
|
|||
|
||||
if [[ -f ${DATABASE} ]]
|
||||
then
|
||||
if ! sed -i "/^${EMAIL}|/d" "${DATABASE}"
|
||||
if ! sedfile -i "/^${EMAIL}|/d" "${DATABASE}"
|
||||
then
|
||||
echo "${UNESCAPED_EMAIL} couldn't be deleted in ${DATABASE}." >&2
|
||||
ERROR=true
|
||||
|
@ -126,7 +126,7 @@ do
|
|||
# remove quota directives
|
||||
if [[ -f ${QUOTA_DATABASE} ]]
|
||||
then
|
||||
if ! sed -i -e "/^${EMAIL}:.*$/d" "${QUOTA_DATABASE}"
|
||||
if ! sedfile -i -e "/^${EMAIL}:.*$/d" "${QUOTA_DATABASE}"
|
||||
then
|
||||
echo "Quota for ${UNESCAPED_EMAIL} couldn't be deleted in ${QUOTA_DATABASE}." >&2
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue