pmcf 4.25.13 → 4.25.14
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/base.mjs +1 -1
- package/src/service.mjs +1 -1
- package/src/services/bind.mjs +32 -38
- package/src/services/chrony.mjs +12 -14
- package/src/services/headscale.mjs +11 -14
- package/src/services/influxdb.mjs +17 -17
- package/src/services/kea.mjs +16 -18
- package/src/services/mosquitto.mjs +14 -17
- package/src/services/openldap.mjs +15 -23
- package/src/services/postfix.mjs +1 -1
- package/src/services/systemd-journal-remote.mjs +18 -20
- package/src/services/systemd-journal-upload.mjs +22 -25
- package/src/services/systemd-journald.mjs +14 -17
- package/src/services/systemd-resolved.mjs +15 -17
- package/src/services/systemd-timesyncd.mjs +13 -15
package/package.json
CHANGED
package/src/base.mjs
CHANGED
package/src/service.mjs
CHANGED
|
@@ -52,7 +52,7 @@ export const ServiceTypeDefinition = {
|
|
|
52
52
|
name: "service",
|
|
53
53
|
priority: 1.1,
|
|
54
54
|
owners: [Host.typeDefinition, "cluster", "network_interface"],
|
|
55
|
-
extends: Base
|
|
55
|
+
extends: Base,
|
|
56
56
|
specializations: {},
|
|
57
57
|
factoryFor(owner, value) {
|
|
58
58
|
const type = value.type ?? value.name;
|
package/src/services/bind.mjs
CHANGED
|
@@ -33,11 +33,10 @@ import { addHook } from "../hooks.mjs";
|
|
|
33
33
|
|
|
34
34
|
const bindNetworkAddressTypes = networkAddressType + "|bind_group";
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
attributes: {
|
|
36
|
+
class bind_group extends Base {
|
|
37
|
+
static priority = 1;
|
|
38
|
+
static key = "name";
|
|
39
|
+
static attributes = {
|
|
41
40
|
name: name_attribute_writable,
|
|
42
41
|
access: {
|
|
43
42
|
type: bindNetworkAddressTypes,
|
|
@@ -77,11 +76,9 @@ const BindGroupTypeDefinition = {
|
|
|
77
76
|
retry: { ...duration_attribute_writable, default: 72000 },
|
|
78
77
|
expire: { ...duration_attribute_writable, default: 600000 },
|
|
79
78
|
minimum: { ...duration_attribute_writable, default: 60000 }
|
|
80
|
-
}
|
|
81
|
-
};
|
|
79
|
+
};
|
|
82
80
|
|
|
83
|
-
|
|
84
|
-
static typeDefinition = BindGroupTypeDefinition;
|
|
81
|
+
static typeDefinition = this;
|
|
85
82
|
static {
|
|
86
83
|
addType(this);
|
|
87
84
|
}
|
|
@@ -94,8 +91,7 @@ class BindGroup extends Base {
|
|
|
94
91
|
notify = true;
|
|
95
92
|
hasCatalog = true;
|
|
96
93
|
hasSVRRecords = true;
|
|
97
|
-
hasLinkLocalAdresses =
|
|
98
|
-
BindGroupTypeDefinition.attributes.hasLinkLocalAdresses.default;
|
|
94
|
+
hasLinkLocalAdresses = bind_group.attributes.hasLinkLocalAdresses.default;
|
|
99
95
|
|
|
100
96
|
recordTTL = "1W";
|
|
101
97
|
|
|
@@ -392,16 +388,26 @@ class BindGroup extends Base {
|
|
|
392
388
|
}
|
|
393
389
|
}
|
|
394
390
|
|
|
395
|
-
|
|
396
|
-
name
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
391
|
+
function addressesStatement(prefix, objects, generateEmpty = false) {
|
|
392
|
+
const body = asArray(objects).map(name => ` ${name};`);
|
|
393
|
+
|
|
394
|
+
if (body.length || generateEmpty) {
|
|
395
|
+
return [`${prefix} {`, body, "};"];
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
return [];
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
export class BindService extends ExtraSourceService {
|
|
402
|
+
static name = "bind";
|
|
403
|
+
static extends = ExtraSourceServiceTypeDefinition;
|
|
404
|
+
static specializationOf = ServiceTypeDefinition;
|
|
405
|
+
static owners = ServiceTypeDefinition.owners;
|
|
406
|
+
static key = "name";
|
|
407
|
+
static attributes = {
|
|
402
408
|
groups: {
|
|
403
409
|
...default_attribute_writable,
|
|
404
|
-
type:
|
|
410
|
+
type: bind_group,
|
|
405
411
|
collection: true,
|
|
406
412
|
writable: true
|
|
407
413
|
},
|
|
@@ -410,8 +416,8 @@ const BindServiceTypeDefinition = {
|
|
|
410
416
|
type: networkAddressType,
|
|
411
417
|
collection: true
|
|
412
418
|
}
|
|
413
|
-
}
|
|
414
|
-
service
|
|
419
|
+
};
|
|
420
|
+
static service = {
|
|
415
421
|
systemdService: "bind.service",
|
|
416
422
|
extends: ["dns"],
|
|
417
423
|
services: {
|
|
@@ -447,31 +453,19 @@ const BindServiceTypeDefinition = {
|
|
|
447
453
|
]
|
|
448
454
|
}
|
|
449
455
|
}
|
|
450
|
-
}
|
|
451
|
-
};
|
|
452
|
-
|
|
453
|
-
function addressesStatement(prefix, objects, generateEmpty = false) {
|
|
454
|
-
const body = asArray(objects).map(name => ` ${name};`);
|
|
455
|
-
|
|
456
|
-
if (body.length || generateEmpty) {
|
|
457
|
-
return [`${prefix} {`, body, "};"];
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
return [];
|
|
461
|
-
}
|
|
456
|
+
};
|
|
462
457
|
|
|
463
|
-
|
|
464
|
-
static typeDefinition = BindServiceTypeDefinition;
|
|
458
|
+
static typeDefinition = this;
|
|
465
459
|
|
|
466
460
|
static {
|
|
467
461
|
addType(this);
|
|
468
|
-
addServiceType(this.
|
|
462
|
+
addServiceType(this.service, this.name);
|
|
469
463
|
}
|
|
470
464
|
|
|
471
465
|
groups = {};
|
|
472
466
|
|
|
473
467
|
get type() {
|
|
474
|
-
return
|
|
468
|
+
return this.constructor.name;
|
|
475
469
|
}
|
|
476
470
|
|
|
477
471
|
materializeExtends() {
|
|
@@ -522,7 +516,7 @@ export class BindService extends ExtraSourceService {
|
|
|
522
516
|
}
|
|
523
517
|
|
|
524
518
|
typeNamed(type, name) {
|
|
525
|
-
if (type ===
|
|
519
|
+
if (type === bind_group.name) {
|
|
526
520
|
return this.groups[name];
|
|
527
521
|
}
|
|
528
522
|
|
package/src/services/chrony.mjs
CHANGED
|
@@ -10,14 +10,14 @@ import {
|
|
|
10
10
|
} from "../extra-source-service.mjs";
|
|
11
11
|
import { writeLines } from "../utils.mjs";
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
name
|
|
15
|
-
priority
|
|
16
|
-
extends
|
|
17
|
-
specializationOf
|
|
18
|
-
owners
|
|
19
|
-
key
|
|
20
|
-
service
|
|
13
|
+
export class ChronyService extends ExtraSourceService {
|
|
14
|
+
static name = "chrony";
|
|
15
|
+
static priority = 1;
|
|
16
|
+
static extends = ExtraSourceServiceTypeDefinition;
|
|
17
|
+
static specializationOf = ServiceTypeDefinition;
|
|
18
|
+
static owners = ServiceTypeDefinition.owners;
|
|
19
|
+
static key = "name";
|
|
20
|
+
static service = {
|
|
21
21
|
systemdService: "chronyd.service",
|
|
22
22
|
extends: ["ntp"],
|
|
23
23
|
services: {
|
|
@@ -42,18 +42,16 @@ const ChronyServiceTypeDefinition = {
|
|
|
42
42
|
]
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
}
|
|
46
|
-
};
|
|
45
|
+
};
|
|
47
46
|
|
|
48
|
-
|
|
49
|
-
static typeDefinition = ChronyServiceTypeDefinition;
|
|
47
|
+
static typeDefinition = this;
|
|
50
48
|
static {
|
|
51
49
|
addType(this);
|
|
52
|
-
addServiceType(this.
|
|
50
|
+
addServiceType(this.service, this.name);
|
|
53
51
|
}
|
|
54
52
|
|
|
55
53
|
get type() {
|
|
56
|
-
return
|
|
54
|
+
return this.constructor.name;
|
|
57
55
|
}
|
|
58
56
|
|
|
59
57
|
async *preparePackages(dir) {
|
|
@@ -2,14 +2,14 @@ import { addType } from "pacc";
|
|
|
2
2
|
import { addServiceType } from "pmcf";
|
|
3
3
|
import { ServiceTypeDefinition, Service } from "../service.mjs";
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
name
|
|
7
|
-
priority
|
|
8
|
-
extends
|
|
9
|
-
specializationOf
|
|
10
|
-
owners
|
|
11
|
-
key
|
|
12
|
-
service
|
|
5
|
+
export class HeadscaleService extends Service {
|
|
6
|
+
static name = "headscale";
|
|
7
|
+
static priority = 1;
|
|
8
|
+
static extends = ServiceTypeDefinition;
|
|
9
|
+
static specializationOf = ServiceTypeDefinition;
|
|
10
|
+
static owners = ServiceTypeDefinition.owners;
|
|
11
|
+
static key = "name";
|
|
12
|
+
static service = {
|
|
13
13
|
endpoints: [
|
|
14
14
|
{
|
|
15
15
|
family: "unix",
|
|
@@ -36,13 +36,10 @@ const HeadscaleServiceTypeDefinition = {
|
|
|
36
36
|
tls: false
|
|
37
37
|
}
|
|
38
38
|
]
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
export class HeadscaleService extends Service {
|
|
43
|
-
static typeDefinition = HeadscaleServiceTypeDefinition;
|
|
39
|
+
};
|
|
40
|
+
static typeDefinition = this;
|
|
44
41
|
static {
|
|
45
42
|
addType(this);
|
|
46
|
-
addServiceType(this.
|
|
43
|
+
addServiceType(this.service, this.name);
|
|
47
44
|
}
|
|
48
45
|
}
|
|
@@ -9,21 +9,21 @@ import {
|
|
|
9
9
|
} from "../utils.mjs";
|
|
10
10
|
import { Service, ServiceTypeDefinition } from "../service.mjs";
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
name
|
|
14
|
-
priority
|
|
15
|
-
extends
|
|
16
|
-
specializationOf
|
|
17
|
-
owners
|
|
18
|
-
key
|
|
19
|
-
attributes
|
|
12
|
+
export class InfluxdbService extends Service {
|
|
13
|
+
static name = "influxdb";
|
|
14
|
+
static priority = 1;
|
|
15
|
+
static extends = ServiceTypeDefinition;
|
|
16
|
+
static specializationOf = ServiceTypeDefinition;
|
|
17
|
+
static owners = ServiceTypeDefinition.owners;
|
|
18
|
+
static key = "name";
|
|
19
|
+
static attributes = {
|
|
20
20
|
metricsDisabled: {
|
|
21
21
|
externalName: "metrics-disabled",
|
|
22
22
|
...boolean_attribute_writable_true,
|
|
23
23
|
configurable: true
|
|
24
24
|
}
|
|
25
|
-
}
|
|
26
|
-
service
|
|
25
|
+
};
|
|
26
|
+
static service = {
|
|
27
27
|
endpoints: [
|
|
28
28
|
{
|
|
29
29
|
family: "IPv4",
|
|
@@ -40,18 +40,16 @@ const InfluxdbServiceTypeDefinition = {
|
|
|
40
40
|
pathname: "/"
|
|
41
41
|
}
|
|
42
42
|
]
|
|
43
|
-
}
|
|
44
|
-
};
|
|
43
|
+
};
|
|
45
44
|
|
|
46
|
-
|
|
47
|
-
static typeDefinition = InfluxdbServiceTypeDefinition;
|
|
45
|
+
static typeDefinition = this;
|
|
48
46
|
static {
|
|
49
47
|
addType(this);
|
|
50
|
-
addServiceType(this.
|
|
48
|
+
addServiceType(this.service, this.name);
|
|
51
49
|
}
|
|
52
50
|
|
|
53
51
|
get type() {
|
|
54
|
-
return
|
|
52
|
+
return this.constructor.name;
|
|
55
53
|
}
|
|
56
54
|
|
|
57
55
|
async *preparePackages(dir) {
|
|
@@ -62,7 +60,9 @@ export class InfluxdbService extends Service {
|
|
|
62
60
|
await writeLines(
|
|
63
61
|
join(dir, "etc", "influxdb"),
|
|
64
62
|
"config.yml",
|
|
65
|
-
setionLinesFromPropertyIterator(
|
|
63
|
+
setionLinesFromPropertyIterator(
|
|
64
|
+
this.attributeIterator(filterConfigurable)
|
|
65
|
+
)
|
|
66
66
|
);
|
|
67
67
|
|
|
68
68
|
yield packageData;
|
package/src/services/kea.mjs
CHANGED
|
@@ -18,14 +18,16 @@ import {
|
|
|
18
18
|
} from "pmcf";
|
|
19
19
|
import { writeLines } from "../utils.mjs";
|
|
20
20
|
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
21
|
+
const keaVersion = "3.0.1";
|
|
22
|
+
|
|
23
|
+
export class KeaService extends Service {
|
|
24
|
+
static name = "kea";
|
|
25
|
+
static priority = 1;
|
|
26
|
+
static extends = ServiceTypeDefinition;
|
|
27
|
+
static specializationOf = ServiceTypeDefinition;
|
|
28
|
+
static owners = ServiceTypeDefinition.owners;
|
|
29
|
+
static key = "name";
|
|
30
|
+
static attributes = {
|
|
29
31
|
"ddns-send-updates": {
|
|
30
32
|
...boolean_attribute_writable_true,
|
|
31
33
|
configurable: true
|
|
@@ -51,8 +53,8 @@ const KeaServiceTypeDefinition = {
|
|
|
51
53
|
configurable: true
|
|
52
54
|
//values: ["check-exists-with-dhcid","no-check-with-dhcid"]
|
|
53
55
|
}
|
|
54
|
-
}
|
|
55
|
-
service
|
|
56
|
+
};
|
|
57
|
+
static service = {
|
|
56
58
|
extends: ["dhcp"],
|
|
57
59
|
services: {
|
|
58
60
|
"kea-ddns": {
|
|
@@ -124,20 +126,16 @@ const KeaServiceTypeDefinition = {
|
|
|
124
126
|
]
|
|
125
127
|
}
|
|
126
128
|
}
|
|
127
|
-
}
|
|
128
|
-
};
|
|
129
|
+
};
|
|
129
130
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
export class KeaService extends Service {
|
|
133
|
-
static typeDefinition = KeaServiceTypeDefinition;
|
|
131
|
+
static typeDefinition = this;
|
|
134
132
|
static {
|
|
135
133
|
addType(this);
|
|
136
|
-
addServiceType(this.
|
|
134
|
+
addServiceType(this.service, this.name);
|
|
137
135
|
}
|
|
138
136
|
|
|
139
137
|
get type() {
|
|
140
|
-
return
|
|
138
|
+
return this.constructor.name;
|
|
141
139
|
}
|
|
142
140
|
|
|
143
141
|
async *preparePackages(dir) {
|
|
@@ -2,14 +2,14 @@ import { port_attribute, string_attribute_writable, addType } from "pacc";
|
|
|
2
2
|
import { addServiceType } from "pmcf";
|
|
3
3
|
import { Service, ServiceTypeDefinition } from "../service.mjs";
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
name
|
|
7
|
-
priority
|
|
8
|
-
extends
|
|
9
|
-
specializationOf
|
|
10
|
-
owners
|
|
11
|
-
key
|
|
12
|
-
attributes
|
|
5
|
+
export class MosquittoService extends Service {
|
|
6
|
+
static name = "mosquitto";
|
|
7
|
+
static priority = 1;
|
|
8
|
+
static extends = ServiceTypeDefinition;
|
|
9
|
+
static specializationOf = ServiceTypeDefinition;
|
|
10
|
+
static owners = ServiceTypeDefinition.owners;
|
|
11
|
+
static key = "name";
|
|
12
|
+
static attributes = {
|
|
13
13
|
listener: {
|
|
14
14
|
...port_attribute,
|
|
15
15
|
writable: true,
|
|
@@ -27,21 +27,18 @@ const MosquittoServiceTypeDefinition = {
|
|
|
27
27
|
...string_attribute_writable,
|
|
28
28
|
configurable: true
|
|
29
29
|
}
|
|
30
|
-
}
|
|
31
|
-
service
|
|
30
|
+
};
|
|
31
|
+
static service = {
|
|
32
32
|
extends: ["mqtt"]
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
export class MosquittoService extends Service {
|
|
37
|
-
static typeDefinition = MosquittoServiceTypeDefinition;
|
|
33
|
+
};
|
|
34
|
+
static typeDefinition = this;
|
|
38
35
|
static {
|
|
39
36
|
addType(this);
|
|
40
|
-
addServiceType(this.
|
|
37
|
+
addServiceType(this.service, this.name);
|
|
41
38
|
}
|
|
42
39
|
|
|
43
40
|
get type() {
|
|
44
|
-
return
|
|
41
|
+
return this.constructor.name;
|
|
45
42
|
}
|
|
46
43
|
|
|
47
44
|
get listener() {
|
|
@@ -1,42 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
string_attribute_writable,
|
|
4
|
-
number_attribute_writable,
|
|
5
|
-
object_attribute,
|
|
6
|
-
addType
|
|
7
|
-
} from "pacc";
|
|
1
|
+
import { string_attribute_writable, addType } from "pacc";
|
|
8
2
|
import { addServiceType } from "pmcf";
|
|
9
3
|
import { ServiceTypeDefinition, Service } from "../service.mjs";
|
|
10
4
|
|
|
11
|
-
|
|
12
|
-
name
|
|
13
|
-
priority
|
|
14
|
-
extends
|
|
15
|
-
specializationOf
|
|
16
|
-
owners
|
|
17
|
-
key
|
|
18
|
-
attributes
|
|
5
|
+
export class OpenLDAPService extends Service {
|
|
6
|
+
static name = "openldap";
|
|
7
|
+
static priority = 1;
|
|
8
|
+
static extends = ServiceTypeDefinition;
|
|
9
|
+
static specializationOf = ServiceTypeDefinition;
|
|
10
|
+
static owners = ServiceTypeDefinition.owners;
|
|
11
|
+
static key = "name";
|
|
12
|
+
static attributes = {
|
|
19
13
|
base: string_attribute_writable,
|
|
20
14
|
uri: string_attribute_writable
|
|
21
|
-
}
|
|
22
|
-
service
|
|
15
|
+
};
|
|
16
|
+
static service = {
|
|
23
17
|
systemdService: "slapd.service",
|
|
24
18
|
extends: ["ldap", "ldapi"],
|
|
25
19
|
services: {}
|
|
26
|
-
}
|
|
27
|
-
};
|
|
20
|
+
};
|
|
28
21
|
|
|
29
|
-
|
|
30
|
-
static typeDefinition = OpenLDAPServiceTypeDefinition;
|
|
22
|
+
static typeDefinition = this;
|
|
31
23
|
static {
|
|
32
24
|
addType(this);
|
|
33
|
-
addServiceType(this.
|
|
25
|
+
addServiceType(this.service, this.name);
|
|
34
26
|
}
|
|
35
27
|
|
|
36
28
|
_base;
|
|
37
29
|
|
|
38
30
|
get type() {
|
|
39
|
-
return
|
|
31
|
+
return this.constructor.name;
|
|
40
32
|
}
|
|
41
33
|
|
|
42
34
|
get base() {
|
package/src/services/postfix.mjs
CHANGED
|
@@ -8,14 +8,18 @@ import {
|
|
|
8
8
|
import { Service, ServiceTypeDefinition, addServiceType } from "pmcf";
|
|
9
9
|
import { filterConfigurable, sectionLines } from "../utils.mjs";
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
11
|
+
/**
|
|
12
|
+
* @property {string} ServerCertificateFile
|
|
13
|
+
* @property {string} ServerKeyFile
|
|
14
|
+
*/
|
|
15
|
+
export class SystemdJournalRemoteService extends Service {
|
|
16
|
+
static name = "systemd-journal-remote";
|
|
17
|
+
static priority = 1;
|
|
18
|
+
static extends = ServiceTypeDefinition;
|
|
19
|
+
static specializationOf = ServiceTypeDefinition;
|
|
20
|
+
static owners = ServiceTypeDefinition.owners;
|
|
21
|
+
static key = "name";
|
|
22
|
+
static attributes = {
|
|
19
23
|
Seal: {
|
|
20
24
|
...boolean_attribute_writable,
|
|
21
25
|
configurable: true
|
|
@@ -61,8 +65,8 @@ const SystemdJournalRemoteServiceTypeDefinition = {
|
|
|
61
65
|
configurable: true
|
|
62
66
|
// default: "zstd lz4 xz"
|
|
63
67
|
}
|
|
64
|
-
}
|
|
65
|
-
service
|
|
68
|
+
};
|
|
69
|
+
static service = {
|
|
66
70
|
systemdService: "systemd-journal-remote.service",
|
|
67
71
|
endpoints: [
|
|
68
72
|
{
|
|
@@ -80,22 +84,16 @@ const SystemdJournalRemoteServiceTypeDefinition = {
|
|
|
80
84
|
pathname: "/"
|
|
81
85
|
}
|
|
82
86
|
]
|
|
83
|
-
}
|
|
84
|
-
};
|
|
87
|
+
};
|
|
85
88
|
|
|
86
|
-
|
|
87
|
-
* @property {string} ServerCertificateFile
|
|
88
|
-
* @property {string} ServerKeyFile
|
|
89
|
-
*/
|
|
90
|
-
export class SystemdJournalRemoteService extends Service {
|
|
91
|
-
static typeDefinition = SystemdJournalRemoteServiceTypeDefinition;
|
|
89
|
+
static typeDefinition = this;
|
|
92
90
|
static {
|
|
93
91
|
addType(this);
|
|
94
|
-
addServiceType(this.
|
|
92
|
+
addServiceType(this.service, this.name);
|
|
95
93
|
}
|
|
96
94
|
|
|
97
95
|
get type() {
|
|
98
|
-
return
|
|
96
|
+
return this.constructor.name;
|
|
99
97
|
}
|
|
100
98
|
|
|
101
99
|
/**
|
|
@@ -7,14 +7,19 @@ import {
|
|
|
7
7
|
import { Service, ServiceTypeDefinition, addServiceType } from "pmcf";
|
|
8
8
|
import { filterConfigurable, sectionLines } from "../utils.mjs";
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
/**
|
|
11
|
+
* @property {string} URL
|
|
12
|
+
* @property {string} ServerCertificateFile
|
|
13
|
+
* @property {string} ServerKeyFile
|
|
14
|
+
*/
|
|
15
|
+
export class SystemdJournalUploadService extends Service {
|
|
16
|
+
static name = "systemd-journal-upload";
|
|
17
|
+
static priority = 1;
|
|
18
|
+
static extends = ServiceTypeDefinition;
|
|
19
|
+
static specializationOf = ServiceTypeDefinition;
|
|
20
|
+
static owners = ServiceTypeDefinition.owners;
|
|
21
|
+
static key = "name";
|
|
22
|
+
static attributes = {
|
|
18
23
|
URL: { ...string_attribute_writable, configurable: true },
|
|
19
24
|
ServerKeyFile: {
|
|
20
25
|
...string_attribute_writable,
|
|
@@ -41,26 +46,18 @@ const SystemdJournalUploadServiceTypeDefinition = {
|
|
|
41
46
|
configurable: true
|
|
42
47
|
// default: false
|
|
43
48
|
}
|
|
44
|
-
}
|
|
45
|
-
service
|
|
49
|
+
};
|
|
50
|
+
static service = {
|
|
46
51
|
systemdService: "systemd-journal-upload.service"
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* @property {string} URL
|
|
52
|
-
* @property {string} ServerCertificateFile
|
|
53
|
-
* @property {string} ServerKeyFile
|
|
54
|
-
*/
|
|
55
|
-
export class SystemdJournalUploadService extends Service {
|
|
56
|
-
static typeDefinition = SystemdJournalUploadServiceTypeDefinition;
|
|
52
|
+
};
|
|
53
|
+
static typeDefinition = this;
|
|
57
54
|
static {
|
|
58
55
|
addType(this);
|
|
59
|
-
addServiceType(this.
|
|
56
|
+
addServiceType(this.service, this.name);
|
|
60
57
|
}
|
|
61
58
|
|
|
62
59
|
get type() {
|
|
63
|
-
return
|
|
60
|
+
return this.constructor.name;
|
|
64
61
|
}
|
|
65
62
|
|
|
66
63
|
/**
|
|
@@ -69,9 +66,9 @@ export class SystemdJournalUploadService extends Service {
|
|
|
69
66
|
* @returns {Object}
|
|
70
67
|
*/
|
|
71
68
|
systemdConfigs(name) {
|
|
72
|
-
console.log(this.fullName,this.owner.fullName);
|
|
73
|
-
console.log(this.property(
|
|
74
|
-
console.log(this.property(
|
|
69
|
+
console.log(this.fullName, this.owner.fullName);
|
|
70
|
+
console.log(this.property("domainName"), this.name);
|
|
71
|
+
console.log(this.property("certs_private_dir"));
|
|
75
72
|
console.log("PROPS", this.expand(this.getAttributes(filterConfigurable)));
|
|
76
73
|
return {
|
|
77
74
|
serviceName: this.systemdService,
|
|
@@ -6,14 +6,14 @@ import {
|
|
|
6
6
|
import { Service, ServiceTypeDefinition, addServiceType } from "pmcf";
|
|
7
7
|
import { filterConfigurable, sectionLines } from "../utils.mjs";
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
name
|
|
11
|
-
priority
|
|
12
|
-
extends
|
|
13
|
-
specializationOf
|
|
14
|
-
owners
|
|
15
|
-
key
|
|
16
|
-
attributes
|
|
9
|
+
export class SystemdJournaldService extends Service {
|
|
10
|
+
static name = "systemd-journald";
|
|
11
|
+
static priority = 1;
|
|
12
|
+
static extends = ServiceTypeDefinition;
|
|
13
|
+
static specializationOf = ServiceTypeDefinition;
|
|
14
|
+
static owners = ServiceTypeDefinition.owners;
|
|
15
|
+
static key = "name";
|
|
16
|
+
static attributes = {
|
|
17
17
|
Storage: {
|
|
18
18
|
...string_attribute_writable,
|
|
19
19
|
configurable: true
|
|
@@ -106,21 +106,18 @@ const SystemdJournalServiceTypeDefinition = {
|
|
|
106
106
|
...string_attribute_writable,
|
|
107
107
|
configurable: true
|
|
108
108
|
}
|
|
109
|
-
}
|
|
110
|
-
service
|
|
109
|
+
};
|
|
110
|
+
static service = {
|
|
111
111
|
systemdService: "systemd-journald.service"
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
export class SystemdJournaldService extends Service {
|
|
116
|
-
static typeDefinition = SystemdJournalServiceTypeDefinition;
|
|
112
|
+
};
|
|
113
|
+
static typeDefinition = this;
|
|
117
114
|
static {
|
|
118
115
|
addType(this);
|
|
119
|
-
addServiceType(this.
|
|
116
|
+
addServiceType(this.service, this.name);
|
|
120
117
|
}
|
|
121
118
|
|
|
122
119
|
get type() {
|
|
123
|
-
return
|
|
120
|
+
return this.constructor.name;
|
|
124
121
|
}
|
|
125
122
|
|
|
126
123
|
systemdConfigs(name) {
|
|
@@ -21,14 +21,14 @@ import {
|
|
|
21
21
|
setionLinesFromPropertyIterator
|
|
22
22
|
} from "../utils.mjs";
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
name
|
|
26
|
-
priority
|
|
27
|
-
extends
|
|
28
|
-
specializationOf
|
|
29
|
-
owners
|
|
30
|
-
key
|
|
31
|
-
attributes
|
|
24
|
+
export class SystemdResolvedService extends ExtraSourceService {
|
|
25
|
+
static name = "systemd-resolved";
|
|
26
|
+
static priority = 1;
|
|
27
|
+
static extends = ExtraSourceServiceTypeDefinition;
|
|
28
|
+
static specializationOf = ServiceTypeDefinition;
|
|
29
|
+
static owners = ServiceTypeDefinition.owners;
|
|
30
|
+
static key = "name";
|
|
31
|
+
static attributes = {
|
|
32
32
|
/* Resolve: {
|
|
33
33
|
...object_attribute,
|
|
34
34
|
attributes: {*/
|
|
@@ -71,22 +71,20 @@ const SystemdResolvedServiceTypeDefinition = {
|
|
|
71
71
|
LLMNR: { ...yesno_attribute_writable, configurable: true }
|
|
72
72
|
/* }
|
|
73
73
|
}*/
|
|
74
|
-
}
|
|
75
|
-
service
|
|
76
|
-
extends: ["dns","mdns","llmnr"],
|
|
74
|
+
};
|
|
75
|
+
static service = {
|
|
76
|
+
extends: ["dns", "mdns", "llmnr"],
|
|
77
77
|
systemdService: "systemd-resolved.service"
|
|
78
|
-
}
|
|
79
|
-
};
|
|
78
|
+
};
|
|
80
79
|
|
|
81
|
-
|
|
82
|
-
static typeDefinition = SystemdResolvedServiceTypeDefinition;
|
|
80
|
+
static typeDefinition = this;
|
|
83
81
|
static {
|
|
84
82
|
addType(this);
|
|
85
|
-
addServiceType(this.
|
|
83
|
+
addServiceType(this.service, this.name);
|
|
86
84
|
}
|
|
87
85
|
|
|
88
86
|
get type() {
|
|
89
|
-
return
|
|
87
|
+
return this.constructor.name;
|
|
90
88
|
}
|
|
91
89
|
|
|
92
90
|
systemdConfigs(name) {
|
|
@@ -12,14 +12,14 @@ import {
|
|
|
12
12
|
} from "pmcf";
|
|
13
13
|
import { filterConfigurable, sectionLines } from "../utils.mjs";
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
name
|
|
17
|
-
priority
|
|
18
|
-
extends
|
|
19
|
-
specializationOf
|
|
20
|
-
owners
|
|
15
|
+
export class SystemdTimesyncdService extends ExtraSourceService {
|
|
16
|
+
static name = "systemd-timesyncd";
|
|
17
|
+
static priority = 1;
|
|
18
|
+
static extends = ExtraSourceServiceTypeDefinition;
|
|
19
|
+
static specializationOf = ServiceTypeDefinition;
|
|
20
|
+
static owners = ServiceTypeDefinition.owners;
|
|
21
21
|
|
|
22
|
-
attributes
|
|
22
|
+
static attributes = {
|
|
23
23
|
NTP: { ...string_attribute_writable, configurable: true },
|
|
24
24
|
FallbackNTP: { ...string_attribute_writable, configurable: true },
|
|
25
25
|
RootDistanceMaxSec: { ...duration_attribute_writable, configurable: true },
|
|
@@ -27,21 +27,19 @@ const SystemdTimesyncdServiceTypeDefinition = {
|
|
|
27
27
|
PollIntervalMaxSec: { ...duration_attribute_writable, configurable: true },
|
|
28
28
|
ConnectionRetrySec: { ...duration_attribute_writable, configurable: true },
|
|
29
29
|
SaveIntervalSec: { ...duration_attribute_writable, configurable: true }
|
|
30
|
-
}
|
|
31
|
-
service
|
|
30
|
+
};
|
|
31
|
+
static service = {
|
|
32
32
|
systemdService: "systemd-timesyncd.service"
|
|
33
|
-
}
|
|
34
|
-
};
|
|
33
|
+
};
|
|
35
34
|
|
|
36
|
-
|
|
37
|
-
static typeDefinition = SystemdTimesyncdServiceTypeDefinition;
|
|
35
|
+
static typeDefinition = this;
|
|
38
36
|
static {
|
|
39
37
|
addType(this);
|
|
40
|
-
addServiceType(this.
|
|
38
|
+
addServiceType(this.service, this.name);
|
|
41
39
|
}
|
|
42
40
|
|
|
43
41
|
get type() {
|
|
44
|
-
return
|
|
42
|
+
return this.constructor.name;
|
|
45
43
|
}
|
|
46
44
|
|
|
47
45
|
systemdConfigs(name) {
|