echo $run_command
- unset FAILED
+ unset ERR
(exec echo "$input" | $docker_path run $user_args $links "${env[@]}" -e DOCKER_HOST_IP=$docker_ip --cidfile $cidbootstrap -i -a stdin -a stdout -a stderr $volumes $image \
- /bin/bash -c "$run_command") || FAILED="TRUE"
+ /bin/bash -c "$run_command") || ERR=$?
+
+ unset FAILED
+ # magic exit code that indicates a retry
+ if [[ "$ERR" == 77 ]]; then
+ exit 77
+ else
+ FAILED=TRUE
+ fi
if [[ $FAILED = "TRUE" ]]; then
if [[ ! -z "$DEBUG" ]]; then
if [ "$PG_MAJOR_OLD" = "9.2" ]; then
echo Add the line: 'base_image: "samsaffron/discourse:0.1.1"'
- echo Change: "templates/postgres.template.yml TO templates/postgres.9.2.template.yml"
+ echo 'In containers/app.yml: Change "templates/postgres.template.yml" TO "templates/postgres.9.2.template.yml"'
echo
fi
if [ "$PG_MAJOR_OLD" = "9.3" ]; then
- echo Change: "templates/postgres.template.yml TO templates/postgres.9.3.template.yml"
+ echo 'In containers/app.yml: Change "templates/postgres.template.yml" TO "templates/postgres.9.3.template.yml"'
echo
fi
echo
echo Please run "./launcher bootstrap" again
echo -------------------------------------------------------------------------------------
- exit 1
+ # Magic exit status to denote no failure
+ exit 77
fi
- exec:
cmd: