summary refs log tree commit diff
diff options
context:
space:
mode:
authorDzmitry Sudnik <dimafirst@tut.by>2018-11-13 23:20:29 -0500
committerDzmitry Sudnik <dimafirst@tut.by>2018-11-14 09:30:01 -0500
commit5517661935afd26333554c6a0006b40f00482b8b (patch)
tree7ece9faa8ce458295602345b3c5f05cd32e48473
parent797e0d84a180dd24b7572ffef9a52677860970cb (diff)
downloadnixpkgs-5517661935afd26333554c6a0006b40f00482b8b.tar
nixpkgs-5517661935afd26333554c6a0006b40f00482b8b.tar.gz
nixpkgs-5517661935afd26333554c6a0006b40f00482b8b.tar.bz2
nixpkgs-5517661935afd26333554c6a0006b40f00482b8b.tar.lz
nixpkgs-5517661935afd26333554c6a0006b40f00482b8b.tar.xz
nixpkgs-5517661935afd26333554c6a0006b40f00482b8b.tar.zst
nixpkgs-5517661935afd26333554c6a0006b40f00482b8b.zip
exhibitor: fix paths for zookeeper shell scripts to point to local folders
-rw-r--r--nixos/modules/services/misc/exhibitor.nix3
1 files changed, 3 insertions, 0 deletions
diff --git a/nixos/modules/services/misc/exhibitor.nix b/nixos/modules/services/misc/exhibitor.nix
index a90c7f402e7..665084a8ae0 100644
--- a/nixos/modules/services/misc/exhibitor.nix
+++ b/nixos/modules/services/misc/exhibitor.nix
@@ -405,6 +405,9 @@ in
         cp -Rf ${pkgs.zookeeper}/* ${cfg.baseDir}/zookeeper
         chown -R zookeeper ${cfg.baseDir}/zookeeper/conf
         chmod -R u+w ${cfg.baseDir}/zookeeper/conf
+        replace_what=$(echo ${pkgs.zookeeper} | sed 's/[\/&]/\\&/g')
+        replace_with=$(echo ${cfg.baseDir}/zookeeper | sed 's/[\/&]/\\&/g')
+        sed -i 's/'"$replace_what"'/'"$replace_with"'/g' ${cfg.baseDir}/zookeeper/bin/zk*.sh
       '';
     };
     users.users = singleton {