mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 23:43:30 +00:00
nixos/zookeeper: adapt to zookeeper 3.6.2
This patch: * Removes an invalid/useless classpath element; * Removes an unnecessary environment variable; * Creates the required '/version-2' data subdirectory; * Redirects audit logging to the "console" (systemd) by default.
This commit is contained in:
parent
afc1994f43
commit
98236860dc
@ -76,6 +76,7 @@ in {
|
||||
default = ''
|
||||
zookeeper.root.logger=INFO, CONSOLE
|
||||
log4j.rootLogger=INFO, CONSOLE
|
||||
log4j.logger.org.apache.zookeeper.audit.Log4jAuditLogger=INFO, CONSOLE
|
||||
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.CONSOLE.layout.ConversionPattern=[myid:%X{myid}] - %-5p [%t:%C{1}@%L] - %m%n
|
||||
@ -128,11 +129,10 @@ in {
|
||||
description = "Zookeeper Daemon";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
environment = { ZOOCFGDIR = configDir; };
|
||||
serviceConfig = {
|
||||
ExecStart = ''
|
||||
${pkgs.jre}/bin/java \
|
||||
-cp "${cfg.package}/lib/*:${cfg.package}/${cfg.package.name}.jar:${configDir}" \
|
||||
-cp "${cfg.package}/lib/*:${configDir}" \
|
||||
${escapeShellArgs cfg.extraCmdLineOptions} \
|
||||
-Dzookeeper.datadir.autocreate=false \
|
||||
${optionalString cfg.preferIPv4 "-Djava.net.preferIPv4Stack=true"} \
|
||||
@ -143,6 +143,7 @@ in {
|
||||
};
|
||||
preStart = ''
|
||||
echo "${toString cfg.id}" > ${cfg.dataDir}/myid
|
||||
mkdir -p ${cfg.dataDir}/version-2
|
||||
'';
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user