1
0
mirror of https://github.com/docker-mailserver/docker-mailserver.git synced 2025-08-08 23:06:49 +02:00

scripts: fix error message caused by grep on first starts (#2591)

Co-authored-by: Casper <casperklein@users.noreply.github.com>
This commit is contained in:
Georg Lauterbach
2022-05-28 20:59:31 +02:00
committed by GitHub
parent 0d30b92a83
commit 05e45c349a

View File

@ -300,7 +300,7 @@ function _setup_dovecot_local_user
local SLEEP_PERIOD='10'
for (( COUNTER = 11 ; COUNTER >= 0 ; COUNTER-- ))
do
if [[ $(grep -cE '.+@.+\|' /tmp/docker-mailserver/postfix-accounts.cf) -ge 1 ]]
if [[ $(grep -cE '.+@.+\|' /tmp/docker-mailserver/postfix-accounts.cf 2>/dev/null || printf '%s' '0') -ge 1 ]]
then
return 0
else