reconfigure admin using configureAdmin
This commit is contained in:
+6
-2
@@ -172,7 +172,7 @@ function fallbackExpiredCertificates(callback) {
|
||||
apps.getAll(function (error, allApps) {
|
||||
if (error) return callback(error);
|
||||
|
||||
allApps.push({ location: 'my', id: 'admin', accessRestriction: null }); // inject fake webadmin app
|
||||
allApps.push({ location: constants.ADMIN_LOCATION }); // inject fake webadmin app
|
||||
|
||||
var expiringApps = [ ];
|
||||
for (var i = 0; i < allApps.length; i++) {
|
||||
@@ -188,7 +188,11 @@ function fallbackExpiredCertificates(callback) {
|
||||
var domain = config.appFqdn(app.location);
|
||||
debug('fallbackExpiredCertificates: replacing cert for %s', domain);
|
||||
|
||||
nginx.configureApp(app, 'cert/host.cert', 'cert/host.key', function (ignoredError) {
|
||||
var configureFunc = app.location === constants.ADMIN_LOCATION
|
||||
? nginx.configureAdmin.bind(null, 'cert/host.cert', 'cert/host.key')
|
||||
: nginx.configureApp.bind(null, app, 'cert/host.cert', 'cert/host.key');
|
||||
|
||||
configureFunc(function (ignoredError) {
|
||||
if (ignoredError) debug('fallbackExpiredCertificates: error reconfiguring app', ignoredError);
|
||||
|
||||
iteratorCallback(); // move to next app
|
||||
|
||||
Reference in New Issue
Block a user