Certbot command in /captain/data/config-override.json needs escaping when used with star #2222
Open
Description
While trying to configure a wildcard certificate:
{
"skipVerifyingDomains": "false",
"certbotImageName": "raisercostin/certbot-dns-cloudflare:v2.11.0-daemon",
"certbotCertCommandRules": [
"domain": "*",
"command": "certbot certonly --dns-cloudflare --dns-cloudflare-credentials /etc/letsencrypt/captain-cloudflare.token -d ${domainName} -d *.${domainName}"
}
]
}
I get the error:
Error: Invalid command: certbot certonly --dns-cloudflare --dns-cloudflare-credentials /etc/letsencrypt/captain-cloudflare.token -d ${domainName} -d *.${domainName}
at CertCommandGenerator.getCertbotCertCommand (/usr/src/app/built/user/system/CertbotManager.js:340:19)
at /usr/src/app/built/user/system/CertbotManager.js:67:51
The solution
Is to escape the parameter from -d *.${domainName}
to -d \"*.${domainName}\"
{
"skipVerifyingDomains": "false",
"certbotImageName": "raisercostin/certbot-dns-cloudflare:v2.11.0-daemon",
"certbotCertCommandRules": [
"domain": "*",
"command": "certbot certonly --dns-cloudflare --dns-cloudflare-credentials /etc/letsencrypt/captain-cloudflare.token -d ${domainName} -d \"*.${domainName}\""
}
]
}
Metadata
Assignees
Labels
No labels