Automating TOS acceptance


#1

When I run the following command from a bash script:

/letsencrypt/letsencrypt-auto certonly --debug --renew-by-default -c /letsencrypt/$DOMAIN.ini --webroot

I have to agree to the TOS manually the first time this command is run (only the first time – subsequent runs don’t ask you to accept the TOS again, of course).

I need the bash script to accept this TOS and continue on. I’ve tried “expect” but can’t get it to work. Does anyone have any ideas?


#2

You can use the --agree-tos flag for this purpose.


#3

@pfg You are a gentleman and a scholar (a scholar for knowing it and a gentleman for not mocking me for missing such an obvious flag…).

Thank you very much. It works perfectly, of course :slight_smile: