Fix retry syntax

This commit is contained in:
Daniel LaForce 2023-09-28 15:46:52 -06:00
parent 84842f83a5
commit 9a6b4fd7e4
1 changed files with 39 additions and 38 deletions

View File

@ -74,7 +74,7 @@ fi
echo "[$0] ***** Checking configuration... *****" 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 if [[ ${CHECK_FOR_OUTDATED_CONFIG} == true ]]; then
nb_services=$(cat config.json | jq '.services | length') 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 *******" echo "[$0] ******* Exiting *******"
exit 1 exit 1
fi fi
# Determine deluge hostname (for flood) based on the VPN status (enabled or not) of deluge # 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 if [[ $(cat config.json | jq '[.services[] | select(.name=="deluge" and .enabled==true and .vpn==true)] | length') -eq 1 ]]; then
export DELUGE_HOST="gluetun" export DELUGE_HOST="gluetun"
@ -286,19 +287,19 @@ echo "[$0] ***** Config OK. Launching services... *****"
if [[ "${SKIP_PULL}" != "1" ]]; then if [[ "${SKIP_PULL}" != "1" ]]; then
echo "[$0] ***** Pulling all images... *****" 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 fi
echo "[$0] ***** Recreating containers if required... *****" 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] ***** Done updating containers *****"
echo "[$0] ***** Clean unused images and volumes... *****" echo "[$0] ***** Clean unused images and volumes... *****"
retry $max_retries docker image prune -af retry --max-retries $max_retries -- docker image prune -af
retry $max_retries docker volume prune -f retry --max-retries $max_retries -- docker volume prune -f
echo "[$0] ***** Done! *****" echo "[$0] ***** Done! *****"
exit 0 exit 0