diff --git a/other/nightly/upgrade.sh b/other/nightly/upgrade.sh index c948f1368..54958ba56 100644 --- a/other/nightly/upgrade.sh +++ b/other/nightly/upgrade.sh @@ -30,9 +30,11 @@ fi # Make sure coolify network exists # It is created when starting Coolify with docker compose -if ! docker network create --attachable --ipv6 coolify 2>/dev/null; then - echo "Failed to create coolify network with ipv6. Trying without ipv6..." - docker network create --attachable coolify 2>/dev/null +if ! docker network inspect coolify >/dev/null 2>&1; then + if ! docker network create --attachable --ipv6 coolify 2>/dev/null; then + echo "Failed to create coolify network with ipv6. Trying without ipv6..." + docker network create --attachable coolify 2>/dev/null + fi fi # docker network create --attachable --driver=overlay coolify-overlay 2>/dev/null diff --git a/scripts/upgrade.sh b/scripts/upgrade.sh index 71959c8b9..e3db2ea81 100644 --- a/scripts/upgrade.sh +++ b/scripts/upgrade.sh @@ -30,9 +30,11 @@ fi # Make sure coolify network exists # It is created when starting Coolify with docker compose -if ! docker network create --attachable --ipv6 coolify 2>/dev/null; then - echo "Failed to create coolify network with ipv6. Trying without ipv6..." - docker network create --attachable coolify 2>/dev/null +if ! docker network inspect coolify >/dev/null 2>&1; then + if ! docker network create --attachable --ipv6 coolify 2>/dev/null; then + echo "Failed to create coolify network with ipv6. Trying without ipv6..." + docker network create --attachable coolify 2>/dev/null + fi fi # docker network create --attachable --driver=overlay coolify-overlay 2>/dev/null