@drumee/setup-infra 1.0.9 → 1.0.11
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 +4 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -223,6 +223,8 @@ 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]);
|
|
@@ -231,7 +233,7 @@ function makeData(opt) {
|
|
|
231
233
|
}
|
|
232
234
|
}
|
|
233
235
|
|
|
234
|
-
if(data.public_ip4){
|
|
236
|
+
if (data.public_ip4) {
|
|
235
237
|
data.reverse_ip4 = data.public_ip4.split('.').reverse().join('.');
|
|
236
238
|
}
|
|
237
239
|
|
|
@@ -406,7 +408,7 @@ function writeInfraConf(data) {
|
|
|
406
408
|
`${mariadb}/50-server.cnf`,
|
|
407
409
|
];
|
|
408
410
|
|
|
409
|
-
if(data.reverse_ip4){
|
|
411
|
+
if (data.reverse_ip4) {
|
|
410
412
|
targets.push({
|
|
411
413
|
tpl: `var/lib/bind/reverse.tpl`,
|
|
412
414
|
out: `var/lib/bind/${data.public_ip4}`
|