pmcf 6.61.0 → 6.61.1
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 +1 -1
- package/src/core-service.mjs +6 -6
package/package.json
CHANGED
package/src/core-service.mjs
CHANGED
|
@@ -277,23 +277,23 @@ export class CoreService extends base {
|
|
|
277
277
|
return serviceTypes(ServiceTypes[this.type]);
|
|
278
278
|
}
|
|
279
279
|
|
|
280
|
-
async writeSystemdCredentialConfig(dir,
|
|
280
|
+
async writeSystemdCredentialConfig(dir, serviceName) {
|
|
281
281
|
let lines = [];
|
|
282
282
|
|
|
283
283
|
const seen = new Set();
|
|
284
284
|
|
|
285
|
-
for (const [
|
|
286
|
-
if (cred.tags.has(
|
|
287
|
-
seen.add(
|
|
285
|
+
for (const [credentialName, cred] of this.credentials) {
|
|
286
|
+
if (cred.tags.has(serviceName) && !seen.has(credentialName)) {
|
|
287
|
+
seen.add(credentialName);
|
|
288
288
|
lines.push(
|
|
289
|
-
`LoadCredentialEncrypted=${
|
|
289
|
+
`LoadCredentialEncrypted=${credentialName}:/etc/credstore.encrypted/${credentialName}`
|
|
290
290
|
);
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
293
|
|
|
294
294
|
if (lines.length) {
|
|
295
295
|
await writeLines(
|
|
296
|
-
join(dir, `usr/lib/systemd/system/${
|
|
296
|
+
join(dir, `usr/lib/systemd/system/${serviceName}.d`),
|
|
297
297
|
`credentials.conf`,
|
|
298
298
|
"[Service]",
|
|
299
299
|
lines
|