From 9dc47e6143fd4ad4a40812386c33eedcf035c913 Mon Sep 17 00:00:00 2001 From: Alexander Tomokhov Date: Wed, 16 Apr 2025 22:17:23 +0400 Subject: [PATCH] fix forgejo,auth: apply oauth and ldap configurations --- sp-modules/gitea/module.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sp-modules/gitea/module.nix b/sp-modules/gitea/module.nix index 778a227..29189e7 100644 --- a/sp-modules/gitea/module.nix +++ b/sp-modules/gitea/module.nix @@ -306,15 +306,18 @@ in if ${lib.getExe pkgs.curl} -X GET --silent --fail "${url}" > /dev/null then echo "${url} responds to GET HTTP request (attempt #$i)" - exit 0 + break else echo "${url} does not respond to GET HTTP request (attempt #$i)" echo sleeping for ${toString delaySec} seconds fi sleep ${toString delaySec} done - echo "error, max attempts to access "${url}" have been used unsuccessfully!" - exit 124 + if [[ "$i" > "${toString maxRetries}" ]] + then + echo "error, max attempts to access "${url}" have been used unsuccessfully!" + exit 124 + fi ''; exe = lib.getExe config.services.forgejo.package;