rename function to setupDnsAndCert

this way, we can reuse this logic for the mail domain as well
This commit is contained in:
Girish Ramakrishnan
2020-08-15 23:17:29 -07:00
parent f52037f305
commit c4101a62ed
5 changed files with 40 additions and 39 deletions

View File

@@ -108,7 +108,7 @@ function setup(dnsConfig, sysinfoConfig, auditSource, callback) {
async.series([
settings.setSysinfoConfig.bind(null, sysinfoConfig),
domains.setupDashboardDnsAndCert.bind(null, domain, auditSource, (progress) => setProgress('setup', progress.message, NOOP_CALLBACK)),
cloudron.setupDnsAndCert.bind(null, constants.ADMIN_LOCATION, domain, auditSource, (progress) => setProgress('setup', progress.message, NOOP_CALLBACK)),
cloudron.setDashboardDomain.bind(null, domain, auditSource),
setProgress.bind(null, 'setup', 'Done'),
eventlog.add.bind(null, eventlog.ACTION_PROVISION, auditSource, { })
@@ -202,7 +202,7 @@ function restore(backupConfig, backupId, version, sysinfoConfig, auditSource, ca
(done) => {
const adminDomain = settings.adminDomain(); // load this fresh from after the backup.restore
async.series([
domains.setupDashboardDnsAndCert.bind(null, adminDomain, auditSource, (progress) => setProgress('restore', progress.message, NOOP_CALLBACK)),
cloudron.setupDnsAndCert.bind(null, constants.ADMIN_LOCATION, adminDomain, auditSource, (progress) => setProgress('restore', progress.message, NOOP_CALLBACK)),
cloudron.setDashboardDomain.bind(null, adminDomain, auditSource)
], done);
},