pmcf 2.5.2 → 2.6.0

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.5.2",
3
+ "version": "2.6.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -16,6 +16,7 @@ import {
16
16
  ExtraSourceServiceTypeDefinition
17
17
  } from "../extra-source-service.mjs";
18
18
  import { subnets } from "../subnet.mjs";
19
+ import { addHook } from "../hooks.mjs";
19
20
 
20
21
  const DNSServiceTypeDefinition = {
21
22
  name: "dns",
@@ -202,7 +203,8 @@ export class DNSService extends ExtraSourceService {
202
203
  description: `zone definitions for ${location.fullName}`,
203
204
  dependencies: ["mf-named"],
204
205
  replaces: ["mf-named-zones"],
205
- access: "private"
206
+ access: "private",
207
+ hooks: {}
206
208
  };
207
209
 
208
210
  packageData.sources = [
@@ -257,6 +259,13 @@ async function generateZoneDefs(dns, location, packageData) {
257
259
  file: `FOREIGN/${domain}.zone`,
258
260
  records: new Set([SOARecord, NSRecord])
259
261
  };
262
+
263
+ addHook(
264
+ packageData.properties.hooks,
265
+ "post_install",
266
+ `rm /var/lib/named/${zone.file}.jnl`
267
+ );
268
+
260
269
  const config = {
261
270
  name: `${domain}.zone.conf`,
262
271
  zones: [zone]
@@ -273,6 +282,14 @@ async function generateZoneDefs(dns, location, packageData) {
273
282
  }
274
283
  }
275
284
  }
285
+
286
+ if (configs.length > 0) {
287
+ addHook(
288
+ packageData.properties.hooks,
289
+ "post_install",
290
+ "systemctl restart named"
291
+ );
292
+ }
276
293
  }
277
294
 
278
295
  for (const domain of dns.localDomains) {