Browse Source

now-alias: Renew expired cert automatically

master
Olli Vanhoja 8 years ago
parent
commit
298591af81
  1. 10
      lib/alias.js

10
lib/alias.js

@ -245,6 +245,16 @@ export default class Alias extends Now {
return this.createAlias(depl, alias);
}
if ('cert_expired' === code) {
console.log(`> Renewing certificate for ${chalk.underline(chalk.bold(alias))}`);
try {
await this.createCert(alias, { renew: true });
} catch (err) {
return bail(err);
}
}
return bail(new Error(body.error.message));
}

Loading…
Cancel
Save