所以我正在使用nodejs和nginx,我想以编程方式使用certbot,并能够从exec()获得输出。
此命令应生成证书而无需用户交互:
certbot certonly --standalone --agree-tos -m [email protected] -d mydomain.com
但我得到了很多文本,我只需要证书的路径和到期日期。
有没有办法以nodejs友好格式获得它,比如json?
看着那个男人:https://certbot.eff.org/docs/man/certbot.html
使用标志-n Run non-interactively
您可以使用标志nginx
为此自动安装。 --nginx Obtain and install certificates using Nginx (default: False)
最后:qazxsw poi