From 05e45c349a794af5508f6078c173de3e6c9d317e Mon Sep 17 00:00:00 2001 From: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com> Date: Sat, 28 May 2022 20:59:31 +0200 Subject: [PATCH] scripts: fix error message caused by `grep` on first starts (#2591) Co-authored-by: Casper --- target/scripts/startup/setup-stack.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/scripts/startup/setup-stack.sh b/target/scripts/startup/setup-stack.sh index 40a86cd3..07c8de75 100644 --- a/target/scripts/startup/setup-stack.sh +++ b/target/scripts/startup/setup-stack.sh @@ -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