pmcf 6.26.2 → 6.26.3

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/cluster.mjs +5 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "6.26.2",
3
+ "version": "6.26.3",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/src/cluster.mjs CHANGED
@@ -88,7 +88,7 @@ export class Cluster extends Host {
88
88
  ""
89
89
  ];
90
90
 
91
- const credentials = [];
91
+ const credentials = new Map();
92
92
  for (const cluster of [...this.owner.clusters.values()].sort((a, b) =>
93
93
  a.name.localeCompare(b.name)
94
94
  )) {
@@ -121,7 +121,7 @@ export class Cluster extends Host {
121
121
  }
122
122
 
123
123
  const credential = name.toUpperCase() + "_PASSWORD";
124
- credentials.push(credential);
124
+ credentials.set(credential,name);
125
125
  cfg.push(` priority ${host.priority - reducedPrio}`);
126
126
  cfg.push(" smtp_alert");
127
127
  cfg.push(" advert_int 5");
@@ -221,9 +221,9 @@ export class Cluster extends Host {
221
221
  "credentials.conf",
222
222
  [
223
223
  "[Service]",
224
- ...credentials.map(
225
- c =>
226
- `LoadCredentialEncrypted=${c}:/etc/credstore.encrypted/keepalived.password`
224
+ ...credentials.entries().map(
225
+ ([credName,instance]) =>
226
+ `LoadCredentialEncrypted=${credName}:/etc/credstore.encrypted/keepalived.${instance}.password`
227
227
  )
228
228
  ]
229
229
  );