Verified Commit bdf77866 authored by Sebastiaan Deckers's avatar Sebastiaan Deckers 馃悜

feat: more verbose acme.sh error logging

parent 01aa353b
......@@ -39,7 +39,7 @@ async function issueCertificate (fastify, domain) {
'--webroot', configuration.acme.webroot,
'--home', configuration.acme.home,
...domains.reduce((args, name) => [...args, '--domain', name], [])
]))
]), { capture: ['stdout', 'stderr'] })
} catch (error) {
if (!error.stderr.includes('Domain key exists')) {
throw error
......
......@@ -155,6 +155,18 @@ module.exports = async (fastify, options) => {
issueCertificate(fastify, domain)
.catch((error) => {
request.log.error(error.message)
if (error.stdout) {
request.log.error(error.stdout)
request.log.error(error.stdout.toString())
} else {
request.log.info('No error.stdout')
}
if (error.stderr) {
request.log.error(error.stderr)
request.log.error(error.stderr.toString())
} else {
request.log.info('No error.stderr')
}
})
if (hasNewFiles === true) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment