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} ]]
|
if [[ -f ${DATABASE} ]]
|
||||||
then
|
then
|
||||||
if ! sed -i "/^${EMAIL}|/d" "${DATABASE}"
|
if ! sedfile -i "/^${EMAIL}|/d" "${DATABASE}"
|
||||||
then
|
then
|
||||||
echo "${UNESCAPED_EMAIL} couldn't be deleted in ${DATABASE}." >&2
|
echo "${UNESCAPED_EMAIL} couldn't be deleted in ${DATABASE}." >&2
|
||||||
ERROR=true
|
ERROR=true
|
||||||
|
@ -126,7 +126,7 @@ do
|
||||||
# remove quota directives
|
# remove quota directives
|
||||||
if [[ -f ${QUOTA_DATABASE} ]]
|
if [[ -f ${QUOTA_DATABASE} ]]
|
||||||
then
|
then
|
||||||
if ! sed -i -e "/^${EMAIL}:.*$/d" "${QUOTA_DATABASE}"
|
if ! sedfile -i -e "/^${EMAIL}:.*$/d" "${QUOTA_DATABASE}"
|
||||||
then
|
then
|
||||||
echo "Quota for ${UNESCAPED_EMAIL} couldn't be deleted in ${QUOTA_DATABASE}." >&2
|
echo "Quota for ${UNESCAPED_EMAIL} couldn't be deleted in ${QUOTA_DATABASE}." >&2
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue