mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-19 11:23:29 +00:00
nixos/zookeeper: replace deprecated usage of PermissionsStartOnly
see https://github.com/NixOS/nixpkgs/issues/53852
This commit is contained in:
parent
a1c48c3f63
commit
55ddb04a8a
@ -119,6 +119,10 @@ in {
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [cfg.package];
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d '${cfg.dataDir}' 0700 zookeeper - - -"
|
||||
];
|
||||
|
||||
systemd.services.zookeeper = {
|
||||
description = "Zookeeper Daemon";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
@ -135,11 +139,8 @@ in {
|
||||
${configDir}/zoo.cfg
|
||||
'';
|
||||
User = "zookeeper";
|
||||
PermissionsStartOnly = true;
|
||||
};
|
||||
preStart = ''
|
||||
mkdir -m 0700 -p ${cfg.dataDir}
|
||||
if [ "$(id -u)" = 0 ]; then chown zookeeper ${cfg.dataDir}; fi
|
||||
echo "${toString cfg.id}" > ${cfg.dataDir}/myid
|
||||
'';
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user