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