3 PATH=.:/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin:`dirname $0`
8 echo `date '+%Y-%m-%d %H:%M:%S %z'`' fly prune-workers ...'
10 if [ `whoami` != 'root' ]; then
11 echo 'ERROR: This script requires the root privilege.' >&2
15 . <%= node['concourse-ci']['docker-compose']['app_dir'] %>/.env
17 for num in `seq 0 ${MAX_RETRY}`; do
18 if [ $num != 0 ]; then
19 echo "Retrying ${num}/${MAX_RETRY}..."
21 fly login -t main -u <%= @basic_auth_username %> -p $CONCOURSE_BASIC_AUTH_PASSWORD -c <%= @external_url %>
26 if [ $num = $MAX_RETRY ]; then
27 echo 'ERROR: Concourse server connection refused.' >&2
30 sleep ${RETRY_INTERVAL}s
34 fly_prune_workers -t main