@@ -33,7 +33,7 @@ let timeouts = {
33
33
'orphan': 2 * 60 * 60,
34
34
interval: 10000,
35
35
expiry_interval: 60 * 60 * 1000,
36
- expiry_threshold: 3 * 24 * 60 * 60,
36
+ expiry_threshold: 1 * 365 * 24 * 60 * 60,
37
37
};
38
38
39
39
ulog_open(ULOG_SYSLOG | ULOG_STDIO, LOG_DAEMON, "cloud_discover");
@@ -44,14 +44,15 @@ uloop.init();
44
44
45
45
let cds_server = 'discovery.open-lan.org';
46
46
47
- function set_cds_server () {
47
+ function detect_certificate_type () {
48
48
let pipe = fs.popen(`openssl x509 -in /etc/ucentral/cert.pem -noout -issuer`);
49
49
let issuer = pipe.read("all");
50
50
pipe.close();
51
51
52
52
if (!match(issuer, /Telecom Infra Project Issuing CA/)) {
53
53
ulog(LOG_INFO, 'Certificate type is "Demo" \n');
54
- cds_server = 'openlan.keys.tip.build';
54
+ cds_server = 'discovery-qa.open-lan.org';
55
+ timeouts.expiry_threshold = 3 * 24 * 60 * 60;
55
56
} else {
56
57
ulog(LOG_INFO, 'Certificate type is "TIP"\n');
57
58
}
@@ -401,7 +402,7 @@ let ubus_methods = {
401
402
},
402
403
};
403
404
404
- set_cds_server ();
405
+ detect_certificate_type ();
405
406
406
407
if (gateway_available()) {
407
408
let status = ubus.call('ucentral', 'status');
0 commit comments