[英]How to programmatically use certbot to enable/disable SSL
因此,我正在使用nodejs和nginx,並且希望以編程方式與之一起使用certbot並能夠從exec()獲取輸出。
此命令應在沒有用戶交互的情況下生成證書:
certbot certonly --standalone --agree-tos -m my@email.com -d mydomain.com
但是我收到了很多文本,我只需要證書的路徑和到期日期。
有沒有辦法以像json這樣的nodejs友好格式來獲取它?
看着男人: https : //certbot.eff.org/docs/man/certbot.html
使用標志-n Run non-interactively
您可以使用標志nginx
來自動執行安裝。 --nginx Obtain and install certificates using Nginx (default: False)
certbot --agree-tos -n --nginx -d example.com -d www.example.com -m hello@mail.com
: certbot --agree-tos -n --nginx -d example.com -d www.example.com -m hello@mail.com
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.