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:
CasperandGeorg Lauterbach authored and GitHub committed 2021-09-14 14:07:29 +02:00
1 parent 2bc3e821fa
commit 54ee1e7567
1 file changed
+2 -2
+2 -2
View File
@@ -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