mf-hosting 2.3.0 → 2.4.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mf-hosting",
3
- "version": "2.3.0",
3
+ "version": "2.4.1",
4
4
  "files": [
5
5
  ".releaserc.json",
6
6
  "pkg/hooks.sh",
@@ -110,6 +110,9 @@
110
110
  "socket.http.group": "http",
111
111
  "socket.http.user": "http",
112
112
  "systemd.unit.dir": "/usr/lib/systemd/system/",
113
+ "systemd.WantedBy": "multi-user.target",
114
+ "systemd.Wants": "network-online.target",
115
+ "systemd.After": "network-online.target",
113
116
  "sysusers.config.dir": "/usr/lib/sysusers.d/",
114
117
  "tmpfiles.config.dir": "/usr/lib/tmpfiles.d/",
115
118
  "var.dir": "/var/lib/${name}/",
@@ -1,13 +1,15 @@
1
1
  backup()
2
2
  {
3
- mkdir -p $1/{{name}}
4
- cp -ra /etc/{{name}}/* $1/{{name}}
3
+ mkdir -p $1/{{name}}/etc
4
+ cp -ra /etc/{{name}}/* $1/{{name}}/etc
5
+ cp -raT /var/lib/{{name}} $1/{{name}}/lib
5
6
  }
6
7
 
7
8
  restore()
8
9
  {
9
10
  mkdir -p /etc/{{name}}
10
- cp -ra $1/{{name}}/* /etc/{{name}}
11
+ cp -ra $1/{{name}}/etc/* /etc/{{name}}
12
+ cp -raT $1/{{name}}/var/ /var/lib/{{name}}
11
13
  }
12
14
 
13
15
  sync()
@@ -1,7 +1,7 @@
1
1
  [Unit]
2
2
  Description={{description}}
3
- Wants=network-online.target
4
- After=network-online.target
3
+ Wants={{systemd.Wants}}
4
+ After={{systemd.After}}
5
5
  StopWhenUnneeded=true
6
6
 
7
7
  [Service]
@@ -52,4 +52,4 @@ ProtectProc=noaccess
52
52
  SystemCallErrorNumber=EPERM
53
53
 
54
54
  [Install]
55
- WantedBy=multi-user.target
55
+ WantedBy={{systemd.WantedBy}}