Skip to content

Commit

Permalink
feat: coc acme to manage certs
Browse files Browse the repository at this point in the history
  • Loading branch information
frankpagan committed Dec 29, 2023
1 parent 999a0e7 commit 13049fa
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/commands/acme.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const { requestCertificate } = require('@cocreate/acme')

module.exports = async function nginx(repos, args) {
let failed = [];

try {
if (args.length) {
if (args[0] === 'create') {
args.shift()
await createServer(args);
} else if (args[0] === 'delete') {
args.shift()
await deleteServer(args);
} else
await createServer(args);
}
} catch (err) {
failed.push({ name: 'GENERAL', des: err.message });
console.error(err.red);
} finally {
return failed;
}

}

0 comments on commit 13049fa

Please sign in to comment.