bin: generate behaviours option in init
This commit is contained in:
parent
1f61fb10f2
commit
0cf13bcc8d
21
bin/init.js
21
bin/init.js
@ -54,6 +54,15 @@ module.exports = function init({isMinimal}) {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
'behaviours': {
|
||||||
|
'on-preset-failed': {
|
||||||
|
'name': 'random-timeout',
|
||||||
|
'params': {
|
||||||
|
'min': 10,
|
||||||
|
'max': 40
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
'dns': [],
|
'dns': [],
|
||||||
'dns_expire': 3600,
|
'dns_expire': 3600,
|
||||||
'timeout': timeout,
|
'timeout': timeout,
|
||||||
@ -89,9 +98,17 @@ module.exports = function init({isMinimal}) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
'behaviours': {
|
||||||
|
'on-preset-failed': {
|
||||||
|
'name': 'random-timeout',
|
||||||
|
'params': {
|
||||||
|
'min': 10,
|
||||||
|
'max': 40
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
'dns': [],
|
'dns': [],
|
||||||
'dns_expire': 3600,
|
'dns_expire': 3600,
|
||||||
'redirect': '',
|
|
||||||
'timeout': timeout,
|
'timeout': timeout,
|
||||||
'workers': 0,
|
'workers': 0,
|
||||||
'log_path': 'bs-server.log',
|
'log_path': 'bs-server.log',
|
||||||
@ -100,9 +117,9 @@ module.exports = function init({isMinimal}) {
|
|||||||
|
|
||||||
if (isMinimal) {
|
if (isMinimal) {
|
||||||
delete serverJson.transport;
|
delete serverJson.transport;
|
||||||
|
delete serverJson.behaviours;
|
||||||
delete serverJson.dns;
|
delete serverJson.dns;
|
||||||
delete serverJson.dns_expire;
|
delete serverJson.dns_expire;
|
||||||
delete serverJson.redirect;
|
|
||||||
delete serverJson.timeout;
|
delete serverJson.timeout;
|
||||||
delete serverJson.workers;
|
delete serverJson.workers;
|
||||||
delete serverJson.log_path;
|
delete serverJson.log_path;
|
||||||
|
Loading…
Reference in New Issue
Block a user