#!/bin/bash

LOG_DIR=/var/vcap/sys/log/gorouter
source /var/vcap/packages/routing_utils/syslog_utils.sh
<% lb_delay = p("router.load_balancer_healthy_threshold") %>

tee_output_to_sys_log "${LOG_DIR}" "post-start" <%= p("router.logging.format.timestamp") %>

echo "Waiting <%= lb_delay %> seconds to allow load balancer to consider gorouter healthy..."
sleep <%= lb_delay %>
echo "Gorouter is ready."
