diff options
author | Bas van Dijk <v.dijk.bas@gmail.com> | 2018-04-08 01:43:47 +0200 |
---|---|---|
committer | Bas van Dijk <v.dijk.bas@gmail.com> | 2018-04-18 00:38:48 +0200 |
commit | ae94825b4a1aa3c5a8344beb91a139467352f53b (patch) | |
tree | 94002260c0535e51d2f9e87f2852bcc90131b97b /nixos/modules | |
parent | 54e6c0e7aef31ff545815e9e0af320b72381b852 (diff) | |
download | nixpkgs-ae94825b4a1aa3c5a8344beb91a139467352f53b.tar nixpkgs-ae94825b4a1aa3c5a8344beb91a139467352f53b.tar.gz nixpkgs-ae94825b4a1aa3c5a8344beb91a139467352f53b.tar.bz2 nixpkgs-ae94825b4a1aa3c5a8344beb91a139467352f53b.tar.lz nixpkgs-ae94825b4a1aa3c5a8344beb91a139467352f53b.tar.xz nixpkgs-ae94825b4a1aa3c5a8344beb91a139467352f53b.tar.zst nixpkgs-ae94825b4a1aa3c5a8344beb91a139467352f53b.zip |
elasticsearch6: fix startup due to missing jvm.options
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/services/search/elasticsearch.nix | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/nixos/modules/services/search/elasticsearch.nix b/nixos/modules/services/search/elasticsearch.nix index adef500b7b5..d61f588205a 100644 --- a/nixos/modules/services/search/elasticsearch.nix +++ b/nixos/modules/services/search/elasticsearch.nix @@ -32,8 +32,11 @@ let (if es5 then (pkgs.writeTextDir "log4j2.properties" cfg.logging) else (pkgs.writeTextDir "logging.yml" cfg.logging)) ]; - # Elasticsearch 5.x won't start when the scripts directory does not exist - postBuild = if es5 then "${pkgs.coreutils}/bin/mkdir -p $out/scripts" else ""; + postBuild = concatStringsSep "\n" (concatLists [ + # Elasticsearch 5.x won't start when the scripts directory does not exist + (optional es5 "${pkgs.coreutils}/bin/mkdir -p $out/scripts") + (optional es6 "ln -s ${cfg.package}/config/jvm.options $out/jvm.options") + ]); }; esPlugins = pkgs.buildEnv { |