pmcf 2.71.8 → 2.71.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "2.71.8",
3
+ "version": "2.71.10",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/src/service.mjs CHANGED
@@ -167,16 +167,15 @@ export class Service extends Base {
167
167
  } else {
168
168
  if (e.family === na.family) {
169
169
  result.push(new Endpoint(this, na, options));
170
- } else {
171
- if (!domainNames.has(this.domainName)) {
172
- domainNames.add(this.domainName);
173
- result.push(
174
- new DomainNameEndpoint(this, this.domainName, options)
175
- );
176
- }
177
170
  }
178
171
  }
179
172
  }
173
+
174
+ if (!domainNames.has(this.domainName)) {
175
+ domainNames.add(this.domainName);
176
+ result.push(new DomainNameEndpoint(this, this.domainName, options));
177
+ }
178
+
180
179
  break;
181
180
  }
182
181
  }
@@ -3,6 +3,7 @@ import { FileContentProvider } from "npm-pkgbuild";
3
3
  import { addType } from "../types.mjs";
4
4
  import { ServiceTypeDefinition, Service } from "../service.mjs";
5
5
  import { writeLines } from "../utils.mjs";
6
+ import { addHook } from "../hooks.mjs";
6
7
 
7
8
  const OpenLDAPServiceTypeDefinition = {
8
9
  name: "openldap",
@@ -30,7 +31,7 @@ const OpenLDAPServiceTypeDefinition = {
30
31
  service: {
31
32
  extends: ["ldap"],
32
33
  services: {
33
- "ldap": {
34
+ ldap: {
34
35
  endpoints: [
35
36
  {
36
37
  family: "unix",
@@ -117,10 +118,23 @@ export class OpenLDAPService extends Service {
117
118
  name: `openldap-${this.location.name}-${name}`,
118
119
  description: `openldap definitions for ${this.fullName}@${name}`,
119
120
  access: "private",
120
- dependencies: ["openldap>=2.6.10"]
121
+ dependencies: ["openldap>=2.6.10"],
122
+ hooks: {}
121
123
  }
122
124
  };
123
125
 
126
+ addHook(
127
+ packageData.properties.hooks,
128
+ "post_upgrade",
129
+ "setfacl -m u:ldap:r /etc/letsencrypt/archive/*/privkey*.pem"
130
+ );
131
+
132
+ addHook(
133
+ packageData.properties.hooks,
134
+ "post_install",
135
+ "setfacl -m u:ldap:r /etc/letsencrypt/archive/*/privkey*.pem"
136
+ );
137
+
124
138
  await writeLines(join(packageData.dir, "etc/conf.d"), "slapd", [
125
139
  "SLAPD_OPTIONS=",
126
140
  "SLAPD_URLS=ldap:/// ldaps:/// ldapi://%2Frun%2Fldapi"
@@ -300,6 +300,7 @@ export class OpenLDAPService extends Service {
300
300
  description: string;
301
301
  access: string;
302
302
  dependencies: string[];
303
+ hooks: {};
303
304
  };
304
305
  }, void, unknown>;
305
306
  }