reverseproxy: rebuild only when needed

re-creating nginx configs is only needed in 3 cases:
* provider changes. we create a rebuild file for this
* nginx config is somehow corrupt by external changes. user can click ui button

on startup, dashboard also always creates the nginx configs. so it's always up to provide the button
This commit is contained in:
Girish Ramakrishnan
2022-11-29 18:11:22 +01:00
parent 3aa3cb6e39
commit 77a5f01585
5 changed files with 28 additions and 10 deletions

View File

@@ -287,10 +287,11 @@ async function updateDashboardDomain(domain, auditSource) {
safe(services.rebuildService('turn', auditSource), { debug }); // to update the realm variable
}
async function renewCerts(auditSource) {
async function renewCerts(options, auditSource) {
assert.strictEqual(typeof options, 'object');
assert.strictEqual(typeof auditSource, 'object');
const taskId = await tasks.add(tasks.TASK_CHECK_CERTS, [ auditSource ]);
const taskId = await tasks.add(tasks.TASK_CHECK_CERTS, [ options, auditSource ]);
tasks.startTask(taskId, {});
return taskId;
}