Skip to content

Commit

Permalink
Merge branch 'master' into docs/fix-fail2ban-rootless-podman-links
Browse files Browse the repository at this point in the history
  • Loading branch information
casperklein committed Jan 27, 2022
2 parents e910041 + ed834d5 commit 6d433f8
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions target/bin/listmailuser
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,19 @@
. /usr/local/bin/helper-functions.sh

# suppress error output, e.g. when listmailuser runs in a fresh container (DMS not running)
. /etc/dms-settings 2> /dev/null
# shellcheck source=/dev/null
. /etc/dms-settings 2>/dev/null

function dovecot_quota_to_hr()
{
if [[ ${1} == "-" ]]
if [[ ${1:-} == "-" ]]
then
echo "~"
else
elif [[ ${1:-} =~ ^[0-9]+$ ]]
then
echo $(( 1024 * ${1} )) | numfmt --to=iec
else
notify 'err' "Supplied non-number argument '${1:-}' to 'dovecot_quota_to_hr()' in script 'listmailuser'"
fi
}

Expand Down

0 comments on commit 6d433f8

Please sign in to comment.