Fix crash when renewAll is called when cloudron is not setup yet

This commit is contained in:
Girish Ramakrishnan
2018-06-05 21:27:32 -07:00
parent 900225957e
commit 70128458b2

View File

@@ -386,6 +386,7 @@ function renewAll(auditSource, callback) {
async.eachSeries(allApps, function (app, iteratorCallback) {
ensureCertificate(app, auditSource, function (error, bundle) {
if (error) return iteratorCallback(error); // this can happen if cloudron is not setup yet
if (bundle.reason !== 'new-le' && bundle.reason !== 'fallback') return iteratorCallback();
// reconfigure for the case where we got a renewed cert after fallback