Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions dockers/docker-fpm-frr/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,18 @@ fi
# Start Quagga processes
supervisorctl start zebra
supervisorctl start staticd

addr="127.0.0.1"
port=2601
start=$(date +%s.%N)
timeout 5s bash -c -- "until </dev/tcp/${addr}/${port}; do sleep 0.1;done"
if [ "$?" != "0" ]; then
logger -p error "Error: zebra is not ready to accept connections"
else
timespan=$(awk "BEGIN {print $(date +%s.%N)-$start; exit}")
logger -p info "It took ${timespan} seconds to wait for zebra to be ready to accept connections"
fi

supervisorctl start bgpd

if [ "$CONFIG_TYPE" == "unified" ]; then
Expand Down