mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
Remove code duplication
This commit is contained in:
parent
d712a29baf
commit
41dfe43c71
|
@ -31,15 +31,7 @@ setup() {
|
|||
-t ${NAME}
|
||||
|
||||
# wait until postfix is up
|
||||
STARTTIME=$SECONDS
|
||||
until docker exec mail_smtponly_second_network /bin/sh -c "nc -z 0.0.0.0 25"
|
||||
do
|
||||
sleep 5
|
||||
if [[ $(($SECONDS - $STARTTIME )) -gt 60 ]]; then
|
||||
echo "Waiting for server timed out after $(($SECONDS - $STARTTIME )) seconds"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
repeat_until_success_or_timeout 60 docker exec mail_smtponly_second_network /bin/sh -c "nc -z 0.0.0.0 25"
|
||||
}
|
||||
|
||||
teardown() {
|
||||
|
|
Loading…
Reference in a new issue