export CF_Key="XXXXXXX" && export CF_Email="XXXXXXX" && \
/root/.acme.sh/acme.sh --issue -d example.com --config-home /etc/nginx/ssl/example.com --dns dns_cf --keylength ec-256
/root/.acme.sh/acme.sh --install-cert -d example.com --config-home /etc/nginx/ssl/example.com --ecc \
--cert-file /etc/nginx/ssl/example.com/example.com.cer \
--key-file /etc/nginx/ssl/example.com/example.com.key \
--fullchain-file /etc/nginx/ssl/example.com/fullchain.cer \
--reloadcmd "service nginx force-reload"
But in crontab
23 0 * * * "/root/.acme.sh"/acme.sh --cron --home "/root/.acme.sh" > /dev/null
without --config-home /etc/nginx/ssl/
Who?
--config-home should be used by the --install command.
https://github.com/Neilpang/acme.sh/wiki/How-to-install#4-advanced-installation
your crontab will contain the --config-home.
do not use it with --issue command, unless you are an expert of acme.sh.
@Neilpang Thx, my next issue about this question - https://github.com/Neilpang/acme.sh/issues/1631
acme.sh is a nifty example of over-engineered stuff and over-engineering in general. Starting from choosing incompatible with LE's native client cert directory location and layout (you have to specify 3 or 4 options (— experts know better) to get cert landed where you need them), ending with green (green, Karl!), 120 sec timer countdown…
Most helpful comment
--config-homeshould be used by the--installcommand.https://github.com/Neilpang/acme.sh/wiki/How-to-install#4-advanced-installation
your crontab will contain the
--config-home.do not use it with
--issuecommand, unless you are an expert of acme.sh.