From 40566790d3afa96d220a3d83054b25123a3e8195 Mon Sep 17 00:00:00 2001 From: Rob Vermaas Date: Fri, 13 Jun 2014 13:42:52 +0200 Subject: [PATCH] elasticsearch: run preStart as root, to allow creating the necessary directories. --- nixos/modules/services/search/elasticsearch.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/modules/services/search/elasticsearch.nix b/nixos/modules/services/search/elasticsearch.nix index b7a3566f95d9..0ba4ff86abe7 100644 --- a/nixos/modules/services/search/elasticsearch.nix +++ b/nixos/modules/services/search/elasticsearch.nix @@ -106,6 +106,7 @@ in { serviceConfig = { ExecStart = "${pkgs.elasticsearch}/bin/elasticsearch -f -Des.path.conf=${configDir}"; User = "elasticsearch"; + PermissionsStartOnly = true; }; preStart = '' mkdir -m 0700 -p ${cfg.dataDir}