Fix retry syntax
This commit is contained in:
parent
84842f83a5
commit
9a6b4fd7e4
|
@ -74,7 +74,7 @@ fi
|
|||
|
||||
echo "[$0] ***** Checking configuration... *****"
|
||||
|
||||
retry $max_retries yq eval -o json config.yaml > config.json
|
||||
retry --max-retries $max_retries -- yq eval -o json config.yaml > config.json
|
||||
|
||||
if [[ ${CHECK_FOR_OUTDATED_CONFIG} == true ]]; then
|
||||
nb_services=$(cat config.json | jq '.services | length')
|
||||
|
@ -105,6 +105,7 @@ if [[ $(cat config.json | jq '[.services[] | select(.name=="flood" and .enabled=
|
|||
echo "[$0] ******* Exiting *******"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Determine deluge hostname (for flood) based on the VPN status (enabled or not) of deluge
|
||||
if [[ $(cat config.json | jq '[.services[] | select(.name=="deluge" and .enabled==true and .vpn==true)] | length') -eq 1 ]]; then
|
||||
export DELUGE_HOST="gluetun"
|
||||
|
@ -286,19 +287,19 @@ echo "[$0] ***** Config OK. Launching services... *****"
|
|||
if [[ "${SKIP_PULL}" != "1" ]]; then
|
||||
echo "[$0] ***** Pulling all images... *****"
|
||||
|
||||
retry $max_retries ${DOCKER_COMPOSE_BINARY} ${ALL_SERVICES} pull
|
||||
retry --max-retries $max_retries -- ${DOCKER_COMPOSE_BINARY} ${ALL_SERVICES} pull
|
||||
fi
|
||||
|
||||
echo "[$0] ***** Recreating containers if required... *****"
|
||||
|
||||
retry $max_retries ${DOCKER_COMPOSE_BINARY} ${ALL_SERVICES} up -d --remove-orphans
|
||||
retry --max-retries $max_retries -- ${DOCKER_COMPOSE_BINARY} ${ALL_SERVICES} up -d --remove-orphans
|
||||
|
||||
echo "[$0] ***** Done updating containers *****"
|
||||
|
||||
echo "[$0] ***** Clean unused images and volumes... *****"
|
||||
|
||||
retry $max_retries docker image prune -af
|
||||
retry $max_retries docker volume prune -f
|
||||
retry --max-retries $max_retries -- docker image prune -af
|
||||
retry --max-retries $max_retries -- docker volume prune -f
|
||||
|
||||
echo "[$0] ***** Done! *****"
|
||||
exit 0
|
Loading…
Reference in New Issue