forked from mirrors/nixpkgs
nixos/rabbitmq: replace deprecated usage of PermissionsStartOnly
see https://github.com/NixOS/nixpkgs/issues/53852
This commit is contained in:
parent
7b2be9b328
commit
2ebbe3988b
|
@ -179,11 +179,11 @@ in {
|
||||||
} // optionalAttrs (cfg.config != "") { RABBITMQ_ADVANCED_CONFIG_FILE = advanced_config_file; };
|
} // optionalAttrs (cfg.config != "") { RABBITMQ_ADVANCED_CONFIG_FILE = advanced_config_file; };
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
PermissionsStartOnly = true; # preStart must be run as root
|
|
||||||
ExecStart = "${cfg.package}/sbin/rabbitmq-server";
|
ExecStart = "${cfg.package}/sbin/rabbitmq-server";
|
||||||
ExecStop = "${cfg.package}/sbin/rabbitmqctl shutdown";
|
ExecStop = "${cfg.package}/sbin/rabbitmqctl shutdown";
|
||||||
User = "rabbitmq";
|
User = "rabbitmq";
|
||||||
Group = "rabbitmq";
|
Group = "rabbitmq";
|
||||||
|
LogsDirectory = "rabbitmq";
|
||||||
WorkingDirectory = cfg.dataDir;
|
WorkingDirectory = cfg.dataDir;
|
||||||
Type = "notify";
|
Type = "notify";
|
||||||
NotifyAccess = "all";
|
NotifyAccess = "all";
|
||||||
|
@ -197,11 +197,8 @@ in {
|
||||||
preStart = ''
|
preStart = ''
|
||||||
${optionalString (cfg.cookie != "") ''
|
${optionalString (cfg.cookie != "") ''
|
||||||
echo -n ${cfg.cookie} > ${cfg.dataDir}/.erlang.cookie
|
echo -n ${cfg.cookie} > ${cfg.dataDir}/.erlang.cookie
|
||||||
chown rabbitmq:rabbitmq ${cfg.dataDir}/.erlang.cookie
|
|
||||||
chmod 600 ${cfg.dataDir}/.erlang.cookie
|
chmod 600 ${cfg.dataDir}/.erlang.cookie
|
||||||
''}
|
''}
|
||||||
mkdir -p /var/log/rabbitmq
|
|
||||||
chown rabbitmq:rabbitmq /var/log/rabbitmq
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue