mf-hosting 1.9.3 → 1.10.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.
Files changed (2) hide show
  1. package/package.json +65 -51
  2. package/pkg/backup.conf +17 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mf-hosting",
3
- "version": "1.9.3",
3
+ "version": "1.10.1",
4
4
  "description": "unix hosting definitions @MF",
5
5
  "devDependencies": {
6
6
  "semantic-release": "^20.0.2"
@@ -13,57 +13,71 @@
13
13
  "url": "https://github.com/arlac77/mf-hosting/issues"
14
14
  },
15
15
  "homepage": "https://github.com/arlac77/mf-hosting#readme",
16
- "pkgbuild": {
17
- "output": {
18
- "arch": {},
19
- "debian": {},
20
- "rpm": {}
16
+ "pkgbuild": [
17
+ {
18
+ "output": {
19
+ "arch": {},
20
+ "debian": {},
21
+ "rpm": {}
22
+ },
23
+ "vendor": "MF",
24
+ "groups": "services",
25
+ "arch": [
26
+ "aarch64",
27
+ "arm",
28
+ "x86_64"
29
+ ],
30
+ "backup.config.dir": "/usr/lib/backup.d/",
31
+ "config.dir": "/etc/${name}/",
32
+ "content": {
33
+ "${nginx.sites.dir}${name}.conf": "pkg/nginx.conf",
34
+ "${systemd.unit.dir}${name}.socket": "pkg/systemd.socket"
35
+ },
36
+ "depends": {
37
+ "systemd": ">=253",
38
+ "nginx-mainline": ">=1.23.2"
39
+ },
40
+ "html.base.href": "<base href=\"{{http.path}}/\"/>",
41
+ "http.api": "${http.origin}${http.api.path}",
42
+ "http.api.path": "${http.path}/api",
43
+ "http.base.path": "/services",
44
+ "http.origin": "https://mfelten.dynv6.net",
45
+ "http.path": "${http.base.path}/${name}",
46
+ "install.base.dir": "/services/",
47
+ "install.dir": "${install.base.dir}${name}${install.sub.dir}",
48
+ "install.sub.dir": "/",
49
+ "journal.endpoint": "/services/journal",
50
+ "nginx.sites.dir": "/etc/nginx/sites/common/",
51
+ "os.group": "${name}",
52
+ "os.user": "${name}",
53
+ "polkit.rules.dir": "/etc/polkit-1/rules.d/",
54
+ "public.base.url": "https://mfelten.dynv6.net/",
55
+ "run.dir": "/run/${name}/",
56
+ "socket.http": "${run.dir}http/socket",
57
+ "socket.http.group": "http",
58
+ "socket.http.user": "http",
59
+ "systemd.unit.dir": "/usr/lib/systemd/system/",
60
+ "sysusers.config.dir": "/usr/lib/sysusers.d/",
61
+ "tmpfiles.config.dir": "/usr/lib/tmpfiles.d/",
62
+ "var.dir": "/var/lib/${name}/",
63
+ "variant": "mf.linux",
64
+ "well-known.content.dir": "/srv/http/.well-known/",
65
+ "wss.api": "${wss.origin}${http.api.path}",
66
+ "wss.origin": "${http.origin}",
67
+ "backup.lib.dir": "/usr/lib/backup.d/"
21
68
  },
22
- "vendor": "MF",
23
- "groups": "services",
24
- "arch": [
25
- "x86_64",
26
- "aarch64",
27
- "arm"
28
- ],
29
- "backup.config.dir": "/usr/lib/backup.d/",
30
- "config.dir": "/etc/${name}/",
31
- "content": {
32
- "${nginx.sites.dir}${name}.conf": "pkg/nginx.conf",
33
- "${systemd.unit.dir}${name}.socket": "pkg/systemd.socket"
34
- },
35
- "depends": {
36
- "systemd": ">=253",
37
- "nginx-mainline": ">=1.23.2"
38
- },
39
- "html.base.href": "<base href=\"{{http.path}}/\"/>",
40
- "http.api": "${http.origin}${http.api.path}",
41
- "http.api.path": "${http.path}/api",
42
- "http.base.path": "/services",
43
- "http.origin": "https://mfelten.dynv6.net",
44
- "http.path": "${http.base.path}/${name}",
45
- "install.base.dir": "/services/",
46
- "install.dir": "${install.base.dir}${name}${install.sub.dir}",
47
- "install.sub.dir": "/",
48
- "journal.endpoint": "/services/journal",
49
- "nginx.sites.dir": "/etc/nginx/sites/common/",
50
- "os.group": "${name}",
51
- "os.user": "${name}",
52
- "polkit.rules.dir": "/etc/polkit-1/rules.d/",
53
- "public.base.url": "https://mfelten.dynv6.net/",
54
- "run.dir": "/run/${name}/",
55
- "socket.http": "${run.dir}http/socket",
56
- "socket.http.group": "http",
57
- "socket.http.user": "http",
58
- "systemd.unit.dir": "/usr/lib/systemd/system/",
59
- "sysusers.config.dir": "/usr/lib/sysusers.d/",
60
- "tmpfiles.config.dir": "/usr/lib/tmpfiles.d/",
61
- "var.dir": "/var/lib/${name}/",
62
- "variant": "mf.linux",
63
- "well-known.content.dir": "/srv/http/.well-known/",
64
- "wss.api": "${wss.origin}${http.api.path}",
65
- "wss.origin": "${http.origin}"
66
- },
69
+ {
70
+ "requires": {
71
+ "properties": {
72
+ "kronos": true
73
+ }
74
+ },
75
+ "content": {
76
+ "${backup.lib.dir}${name}.conf": "pkg/backup.conf"
77
+ },
78
+ "backup": "${config.dir}config.json"
79
+ }
80
+ ],
67
81
  "template": {
68
82
  "inheritFrom": [
69
83
  "arlac77/template-npm",
@@ -0,0 +1,17 @@
1
+ backup()
2
+ {
3
+ mkdir -p $1/{{name}}
4
+ cp -ra /etc/{{name}}/* $1/{{name}}
5
+ }
6
+
7
+ restore()
8
+ {
9
+ mkdir -p /etc/{{name}}
10
+ cp -ra $1/{{name}}/* /etc/{{name}}
11
+ }
12
+
13
+ sync()
14
+ {
15
+ mkdir -p /etc/{{name}}
16
+ rsync -e "ssh -i /root/.ssh/rsync" --stats -ra -X -A -S root@$SOURCE_HOST:/etc/{{name}} /etc/{{name}}
17
+ }