mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-20 03:43:45 +00:00
openldap: run in foreground
Now that we use notify daemon type, this works safely and simplifies configuration.
This commit is contained in:
parent
d72f89a8fc
commit
38ead944ce
@ -169,8 +169,7 @@ in {
|
||||
default = null;
|
||||
description = ''
|
||||
Use this config directory instead of generating one from the
|
||||
<literal>settings</literal> option. Overrides all NixOS settings. If
|
||||
you use this option,ensure `olcPidFile` is set to `/run/slapd/slapd.conf`.
|
||||
<literal>settings</literal> option. Overrides all NixOS settings.
|
||||
'';
|
||||
example = "/var/db/slapd.d";
|
||||
};
|
||||
@ -216,7 +215,6 @@ in {
|
||||
attrs = {
|
||||
objectClass = "olcGlobal";
|
||||
cn = "config";
|
||||
olcPidFile = "/run/slapd/slapd.pid";
|
||||
};
|
||||
children."cn=schema".attrs = {
|
||||
cn = "schema";
|
||||
@ -265,7 +263,7 @@ in {
|
||||
'';
|
||||
serviceConfig = {
|
||||
ExecStart = lib.escapeShellArgs ([
|
||||
"${openldap}/libexec/slapd" "-u" cfg.user "-g" cfg.group "-F" configDir
|
||||
"${openldap}/libexec/slapd" "-d" "0" "-u" cfg.user "-g" cfg.group "-F" configDir
|
||||
"-h" (lib.concatStringsSep " " cfg.urlList)
|
||||
]);
|
||||
Type = "notify";
|
||||
@ -273,7 +271,6 @@ in {
|
||||
# outside the main process:
|
||||
# Got notification message from PID 6378, but reception only permitted for main PID 6377
|
||||
NotifyAccess = "all";
|
||||
PIDFile = cfg.settings.attrs.olcPidFile;
|
||||
};
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user