summary refs log tree commit diff
diff options
context:
space:
mode:
authorJean-Philippe Cugnet <jean-philippe@cugnet.eu>2021-12-30 19:03:35 +0100
committerJean-Philippe Cugnet <jean-philippe@cugnet.eu>2021-12-30 19:03:35 +0100
commit40fb59cfc389d1726dcbf72f4fcd2cfbefcf960c (patch)
tree7618798cb547226db375393b4789bca909fcb04f
parente5189acc165f8881fc6750ebe255dabeb754d775 (diff)
downloadnixpkgs-40fb59cfc389d1726dcbf72f4fcd2cfbefcf960c.tar
nixpkgs-40fb59cfc389d1726dcbf72f4fcd2cfbefcf960c.tar.gz
nixpkgs-40fb59cfc389d1726dcbf72f4fcd2cfbefcf960c.tar.bz2
nixpkgs-40fb59cfc389d1726dcbf72f4fcd2cfbefcf960c.tar.lz
nixpkgs-40fb59cfc389d1726dcbf72f4fcd2cfbefcf960c.tar.xz
nixpkgs-40fb59cfc389d1726dcbf72f4fcd2cfbefcf960c.tar.zst
nixpkgs-40fb59cfc389d1726dcbf72f4fcd2cfbefcf960c.zip
nixos/elasticsearch: fix postStart to allow non-localhost listenAddress
Before this fix, if the listenAddress is set to something else than 127.0.0.1,
the service fails to detect that Elasticsearch has properly started and stop.
-rw-r--r--nixos/modules/services/search/elasticsearch.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/services/search/elasticsearch.nix b/nixos/modules/services/search/elasticsearch.nix
index 6df147be0c4..98c35a7ec84 100644
--- a/nixos/modules/services/search/elasticsearch.nix
+++ b/nixos/modules/services/search/elasticsearch.nix
@@ -204,7 +204,7 @@ in
       postStart = ''
         # Make sure elasticsearch is up and running before dependents
         # are started
-        while ! ${pkgs.curl}/bin/curl -sS -f http://localhost:${toString cfg.port} 2>/dev/null; do
+        while ! ${pkgs.curl}/bin/curl -sS -f http://${cfg.listenAddress}:${toString cfg.port} 2>/dev/null; do
           sleep 1
         done
       '';