@drumee/setup-infra 1.0.10 → 1.0.12

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/index.js CHANGED
@@ -223,17 +223,17 @@ function makeData(opt) {
223
223
  }
224
224
  for (let row of opt) {
225
225
  let [key, value, fallback] = row;
226
+ if (!value) value = fallback;
227
+ if (!value) continue;
226
228
  if (!data[key]) {
227
229
  if (/.+\+$/.test(value)) {
228
230
  value = value.replace(/\+$/, data[key]);
229
231
  }
230
- if(value){
231
- data[key] = value.trim() || fallback;
232
- }
232
+ data[key] = value.trim() || fallback;
233
233
  }
234
234
  }
235
235
 
236
- if(data.public_ip4){
236
+ if (data.public_ip4) {
237
237
  data.reverse_ip4 = data.public_ip4.split('.').reverse().join('.');
238
238
  }
239
239
 
@@ -408,7 +408,7 @@ function writeInfraConf(data) {
408
408
  `${mariadb}/50-server.cnf`,
409
409
  ];
410
410
 
411
- if(data.reverse_ip4){
411
+ if (data.reverse_ip4) {
412
412
  targets.push({
413
413
  tpl: `var/lib/bind/reverse.tpl`,
414
414
  out: `var/lib/bind/${data.public_ip4}`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drumee/setup-infra",
3
- "version": "1.0.10",
3
+ "version": "1.0.12",
4
4
  "description": "Drumee Infrastructure Setup Utilities",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -33,7 +33,7 @@ export DRUMEE_SYSTEM_USER=<%= system_user %>
33
33
  export DRUMEE_TMP_DIR=<%= data_dir %>/tmp
34
34
  export DRUMEE_UI_HOME=<%= runtime_dir %>/ui
35
35
  export DRUMEE_STORAGE_BACKUP=<%= storage_backup %>
36
- export DRUMEE_DB_BACKUP=<%= db_backup %>
36
+ export DRUMEE_DB_BACKUP=<%= storage_backup %>/db
37
37
  export JITSI_DOMAIN=<%= jitsi_domain %>
38
38
  export OWN_CERTS_DIR=<%= own_certs_dir %>
39
39
  export PUBLIC_UI_ROOT=<%= public_ui_root %>