[SOLVED] pvenode how to accept tos

ledo

New Member
Apr 10, 2020
1
1
1
24
Hi,
I try to get LE certs for my proxmox node. I cant find a way to accept the LE tos in my script.
how do I accept the tos without manual pushing "y" in terminal?

Code:
pvenode acme account register default mail@domain.tld --directory https://acme-staging-v02.api.letsencrypt.org/directory

Attempting to fetch Terms of Service from 'https://acme-staging-v02.api.letsencrypt.org/directory'
Terms of Service: https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf
Do you agree to the above terms? [y|N]

I tried:
echo 'y' | ...
echo 'y\n' | ...
yes | ...
... --force 1
... --quiet 1

Any help is highly appreciated. Happy Easter!


EDIT:
Solved with expect, when someone finds a more elegant way, please tell me.
Code:
expect -c "spawn pvenode acme account register default mail@domain.tld --directory https://acme-staging-v02.api.letsencrypt.org/directory; expect -re \"Do you agree\";  send \"y\r\";"

EDIT2: https://forum.proxmox.com/threads/lets-encrypt-non-interactive-setup.65783/
 
Last edited:
  • Like
Reactions: pcready.cl
Hi,
I try to get LE certs for my proxmox node. I cant find a way to accept the LE tos in my script.
how do I accept the tos without manual pushing "y" in terminal?

Code:
pvenode acme account register default mail@domain.tld --directory https://acme-staging-v02.api.letsencrypt.org/directory

Attempting to fetch Terms of Service from 'https://acme-staging-v02.api.letsencrypt.org/directory'
Terms of Service: https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf
Do you agree to the above terms? [y|N]

I tried:
echo 'y' | ...
echo 'y\n' | ...
yes | ...
... --force 1
... --quiet 1

Any help is highly appreciated. Happy Easter!


EDIT:
Solved with expect, when someone finds a more elegant way, please tell me.
Code:
expect -c "spawn pvenode acme account register default mail@domain.tld --directory https://acme-staging-v02.api.letsencrypt.org/directory; expect -re \"Do you agree\";  send \"y\r\";"

EDIT2: https://forum.proxmox.com/threads/lets-encrypt-non-interactive-setup.65783/
Thanks Bro!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!